| 81 | } |
| 82 | |
| 83 | void TQTcpServerTest::cleanupTestCase() { |
| 84 | //first, stop the thread which holds the server |
| 85 | serverThread->quit(); |
| 86 | serverThread->wait(); |
| 87 | // now, it is safe to delete the server |
| 88 | server.reset(); |
| 89 | // delete thread now |
| 90 | serverThread.reset(); |
| 91 | |
| 92 | // cleanup client |
| 93 | client.reset(); |
| 94 | } |
| 95 | |
| 96 | void TQTcpServerTest::test_communicate() { |
| 97 | client->addString("foo"); |