X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=test%2Fserialize.cpp;h=db31fba1f38ae67974e87e778089b85d76eec9bc;hp=02f8a6edbef858bc8d2be5ad0c88387735597ae5;hb=393e7b700efffc748e593661b365ead414a341c1;hpb=01a464637ed95b0aacd58eb74bdd17df4a7851ab diff --git a/test/serialize.cpp b/test/serialize.cpp index 02f8a6e..db31fba 100644 --- a/test/serialize.cpp +++ b/test/serialize.cpp @@ -117,19 +117,23 @@ class test_serialize : public TestFixture CPPUNIT_TEST_SUITE_END(); + pid_t child_pid; + public: void setUp() { } void tearDown() - { } + { + // make sure the server-child is dead before the next test runs + kill(child_pid,SIGKILL); + sleep(1); + } void ClientSerializeErr() { - pid_t pid; - - switch(pid=fork()) + switch(child_pid=fork()) { case -1: { @@ -156,7 +160,7 @@ class test_serialize : public TestFixture // wait till server is up sleep(1); socket_client_connection sc("./socket"); - command_client cc(sc); + command_client cc(&sc); string errormsg;