Skip to content

Commit

Permalink
[CI] Fix CI for cpp test (dmlc#570)
Browse files Browse the repository at this point in the history
* fix CI for cpp test

* update port number
  • Loading branch information
aksnzhy authored May 26, 2019
1 parent 3d7c330 commit 85f2d1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 135 deletions.
16 changes: 8 additions & 8 deletions tests/cpp/socket_communicator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ TEST(SocketCommunicatorTest, SendAndRecv) {
const char * msg = "0123456789";
ASSERT_GE(pid, 0);
if (pid > 0) { // parent: server
char serbuff[10];
char serbuff[10];
memset(serbuff, '\0', 10);
SocketReceiver receiver;
receiver.Wait("127.0.0.1", 50051, 1, 500);
SocketReceiver receiver;
receiver.Wait("127.0.0.1", 2049, 1, 500);
receiver.Recv(serbuff, 10);
ASSERT_EQ(string("0123456789"), string(serbuff, 10));
receiver.Finalize();
} else { // child: client
sleep(1);
SocketSender sender;
sender.AddReceiver("127.0.0.1", 50051, 0);
sender.Connect();
sender.Send(msg, 10, 0);
sender.Finalize();
SocketSender sender;
sender.AddReceiver("127.0.0.1", 2049, 0);
sender.Connect();
sender.Send(msg, 10, 0);
sender.Finalize();
}
}
127 changes: 0 additions & 127 deletions tests/cpp/tcp_socket_test.cc

This file was deleted.

0 comments on commit 85f2d1d

Please sign in to comment.