MCPcopy Create free account
hub / github.com/apache/brpc / TEST_F

Function TEST_F

test/brpc_rdma_unittest.cpp:174–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172};
173
174TEST_F(RdmaTest, client_close_before_hello_send) {
175 StartServer();
176
177 sockaddr_in addr;
178 bzero((char*)&addr, sizeof(addr));
179 addr.sin_family = AF_INET;
180 addr.sin_port = htons(PORT);
181
182 butil::fd_guard sockfd(socket(AF_INET, SOCK_STREAM, 0));
183 ASSERT_TRUE(sockfd >= 0);
184 ASSERT_EQ(0, connect(sockfd, (sockaddr*)&addr, sizeof(sockaddr)));
185 usleep(100000); // wait for server to handle the msg
186 Socket* s = GetSocketFromServer(0);
187 ASSERT_EQ(rdma::RdmaEndpoint::UNINIT, s->_rdma_ep->_state);
188 close(sockfd);
189 usleep(100000); // wait for server to handle the msg
190 ASSERT_EQ(NULL, GetSocketFromServer(0));
191
192 StopServer();
193}
194
195TEST_F(RdmaTest, client_hello_msg_invalid_magic_str) {
196 StartServer();

Callers

nothing calls this directly

Calls 15

HostToNet16Function · 0.85
HostToNet32Function · 0.85
GetRdmaGidFunction · 0.85
tcp_listenFunction · 0.85
DoNothingFunction · 0.85
bthread_id_joinFunction · 0.85
NetToHost32Function · 0.85
DumpRdmaEndpointInfoFunction · 0.85
berrorFunction · 0.85
str2ipFunction · 0.85
RegisterMemoryForRdmaFunction · 0.85
DeregisterMemoryForRdmaFunction · 0.85

Tested by

no test coverage detected