X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=test%2Fsimplecmd.cpp;h=42721ea64a233763fee63063cce4807fe4955fbe;hp=eb4343c5a9fd3ff9a9131943441733ef02a505a4;hb=fb3345ada7ea94225b78994fd50e3de693a2a3d5;hpb=4c3662a0b083759056b93c21e747e5551a8ddfcc diff --git a/test/simplecmd.cpp b/test/simplecmd.cpp index eb4343c..42721ea 100644 --- a/test/simplecmd.cpp +++ b/test/simplecmd.cpp @@ -162,7 +162,7 @@ class test_simplecmd : public TestFixture sleep(1); socket_client_connection sc("./socket"); sc.set_logging(&cerr,debug); - command_client cc(sc); + command_client cc(&sc); result_container rc; cc.send_command(new testfunc_cmd("hello"),rc); @@ -172,6 +172,7 @@ class test_simplecmd : public TestFixture CPPUNIT_ASSERT_EQUAL(string("hello, testfunc() was here"),ret); } } + kill(pid,SIGKILL); } void SimpleException() @@ -206,7 +207,7 @@ class test_simplecmd : public TestFixture sleep(1); socket_client_connection sc("./socket"); sc.set_logging(&cerr,debug); - command_client cc(sc); + command_client cc(&sc); result_container rc; cc.send_command(new testfunc_cmd("throw"),rc); @@ -223,6 +224,8 @@ class test_simplecmd : public TestFixture { throw; } CPPUNIT_ASSERT_EQUAL(string("throw me around"),ret); + + kill(pid,SIGKILL); } } } @@ -258,7 +261,7 @@ class test_simplecmd : public TestFixture // wait till server is up sleep(1); socket_client_connection sc("./socket"); - command_client cc(sc); + command_client cc(&sc); result_container rc; cc.send_command(new testfunc_cmd("big"),rc); @@ -266,6 +269,8 @@ class test_simplecmd : public TestFixture string ret=dynamic_cast(rc.get_result())->get_data(); CPPUNIT_ASSERT_EQUAL(string().insert(0,100*1024,'x'),ret); + + kill(pid,SIGKILL); } } } @@ -301,7 +306,7 @@ class test_simplecmd : public TestFixture // wait till server is up sleep(1); socket_client_connection sc("./socket"); - command_client cc(sc); + command_client cc(&sc); result_container rc; cc.send_command(new testfunc_cmd(string().insert(0,100*1024,'y')),rc); @@ -309,6 +314,8 @@ class test_simplecmd : public TestFixture string ret=dynamic_cast(rc.get_result())->get_data(); CPPUNIT_ASSERT_EQUAL(string().insert(0,100*1024,'y')+", testfunc() was here",ret); + + kill(pid,SIGKILL); } } }