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

Function TEST_F

3rdparty/libprocess/src/tests/grpc_tests.cpp:128–149  ·  view source on GitHub ↗

This test verifies that a gRPC future is properly set once the given call is processed by the server.

Source from the content-addressed store, hash-verified

126// This test verifies that a gRPC future is properly set once the
127// given call is processed by the server.
128TEST_F(GRPCClientTest, Success)
129{
130 PingPongServer server;
131 Try<client::Connection> connection = server.startup();
132 ASSERT_SOME(connection);
133
134 client::Runtime runtime;
135
136 Future<Try<Pong, StatusError>> pong = runtime.call(
137 connection.get(),
138 GRPC_CLIENT_METHOD(PingPong, Send),
139 Ping(),
140 call_options());
141
142 AWAIT_ASSERT_READY(pong);
143 EXPECT_SOME(pong.get());
144
145 runtime.terminate();
146 AWAIT_ASSERT_READY(runtime.wait());
147
148 ASSERT_SOME(server.shutdown());
149}
150
151
152// This test verifies that we can have multiple outstanding gRPC calls.

Callers

nothing calls this directly

Calls 11

NothingClass · 0.85
shutdownMethod · 0.65
errorMethod · 0.65
startupMethod · 0.45
callMethod · 0.45
getMethod · 0.45
terminateMethod · 0.45
waitMethod · 0.45
setMethod · 0.45
futureMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected