import time
import waeup.stress
#register_url = 'http://localhost:8080/uniben/applicants/putme2012/register'
register_url = 'http://localhost:8080/stress_app/@@index'
print "RUN SETUP"

instance = 'kofa'

## removes any existing ZODB (for a clean ZODB at start)
waeup.stress.remove_zodb(instance)

## installs a University named 'stress_app' in root folder
waeup.stress.install_app(instance)

## starts an instance as daemon
waeup.stress.start_instance(instance)
waeup.stress.wait_for_startup('localhost', 8080) # wait until daemon is up
## after starting an instance, we have to wait for the instance to come up
#time.sleep(3)

## we need a running instance, so leave this commented out.
#waeup.stress.stop_instance(instance)
