use of com.yahoo.fs4.mplex.Backend.BackendStatistics in project vespa by vespa-engine.
the class BackendTestCase method requireStatistics.
@Test
public void requireStatistics() throws IOException, InvalidChannelException {
FS4Channel channel = backend.openPingChannel();
server.dispatch.channelId = -1;
server.dispatch.packetData = PONG;
assertTrue(channel.sendPacket(new PingPacket()));
try {
channel.receivePackets(1000, 1);
} catch (ChannelTimeoutException e) {
fail("Could not get packets from simulated backend.");
}
BackendStatistics stats = backend.getStatistics();
assertEquals(1, stats.totalConnections());
}
Aggregations