Added a simple semaphore for the server to start..only works in test envs..not for production use. Sufficient for tests i guess.