Fix signal handlers.
Wait till a port opens for you.
Wait untill the server has started.

We haven't supported multiple instances actually, so I dropped tests :/
Don't forget to stop the server even when it hasn't started yet.
Don't wait a server more then twice.
Check if we could connect correctly.