MCPcopy Create free account
hub / github.com/grpc/grpc-java / pingPongTest

Method pingPongTest

alts/src/test/java/io/grpc/alts/internal/TsiTest.java:160–172  ·  view source on GitHub ↗

Ping pong test.

(Handshakers handshakers, RegisterRef ref)

Source from the content-addressed store, hash-verified

158
159 /** Ping pong test. */
160 public static void pingPongTest(Handshakers handshakers, RegisterRef ref)
161 throws GeneralSecurityException {
162 performHandshake(DEFAULT_TRANSPORT_BUFFER_SIZE, handshakers);
163
164 TsiFrameProtector clientProtector = handshakers.getClient().createFrameProtector(alloc);
165 TsiFrameProtector serverProtector = handshakers.getServer().createFrameProtector(alloc);
166
167 sendMessage(clientProtector, serverProtector, -1, EXAMPLE_MESSAGE1, ref);
168 sendMessage(serverProtector, clientProtector, -1, EXAMPLE_MESSAGE2, ref);
169
170 clientProtector.destroy();
171 serverProtector.destroy();
172 }
173
174 /** Ping pong test with exact frame size. */
175 public static void pingPongExactFrameSizeTest(Handshakers handshakers, RegisterRef ref)

Callers 2

pingPongMethod · 0.95
pingPongMethod · 0.95

Calls 6

performHandshakeMethod · 0.95
sendMessageMethod · 0.95
destroyMethod · 0.95
getClientMethod · 0.80
createFrameProtectorMethod · 0.65
getServerMethod · 0.65

Tested by

no test coverage detected