Skip to content

Commit

Permalink
Make MyServer as a stack variable
Browse files Browse the repository at this point in the history
  • Loading branch information
reyoung committed Jan 24, 2017
1 parent fae5d82 commit 23c8ad8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions paddle/pserver/test/test_ProtoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,8 @@ TEST(ProtoServer, extended) {
int main(int argc, char** argv) {
paddle::initMain(argc, argv);
testing::InitGoogleTest(&argc, argv);

std::unique_ptr<MyServer> server;
if (FLAGS_rdma_tcp == "rdma") {
server.reset(new MyServer(FLAGS_port, 0));
} else {
server.reset(new MyServer(FLAGS_port));
}

server->start();
MyServer server(FLAGS_port, FLAGS_rdma_tcp == "rdma" ? 0 : -1);
server.start();
usleep(10000);

return RUN_ALL_TESTS();
Expand Down

0 comments on commit 23c8ad8

Please sign in to comment.