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);
CPPUNIT_ASSERT_EQUAL(string("hello, testfunc() was here"),ret);
}
}
+ kill(pid,SIGKILL);
}
void SimpleException()
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);
{ throw; }
CPPUNIT_ASSERT_EQUAL(string("throw me around"),ret);
+
+ kill(pid,SIGKILL);
}
}
}
// 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);
string ret=dynamic_cast<testfunc_res*>(rc.get_result())->get_data();
CPPUNIT_ASSERT_EQUAL(string().insert(0,100*1024,'x'),ret);
+
+ kill(pid,SIGKILL);
}
}
}
// 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);
string ret=dynamic_cast<testfunc_res*>(rc.get_result())->get_data();
CPPUNIT_ASSERT_EQUAL(string().insert(0,100*1024,'y')+", testfunc() was here",ret);
+
+ kill(pid,SIGKILL);
}
}
}