提交 23c8ad85 编写于 作者: Y Yu Yang

Make MyServer as a stack variable

上级 fae5d82c
...@@ -161,15 +161,8 @@ TEST(ProtoServer, extended) { ...@@ -161,15 +161,8 @@ TEST(ProtoServer, extended) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
paddle::initMain(argc, argv); paddle::initMain(argc, argv);
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
MyServer server(FLAGS_port, FLAGS_rdma_tcp == "rdma" ? 0 : -1);
std::unique_ptr<MyServer> server; server.start();
if (FLAGS_rdma_tcp == "rdma") {
server.reset(new MyServer(FLAGS_port, 0));
} else {
server.reset(new MyServer(FLAGS_port));
}
server->start();
usleep(10000); usleep(10000);
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册