fix race condition on tests.
The test expects the SSL server socket to be encrypted, but was not waiting for it to happen.
Use a QSignalSpy to wait for the signal that ensures us we can go ahead.