use of org.apache.ratis.grpc.server.GrpcService in project incubator-ratis by apache.
the class TestGrpcMessageMetrics method assertMessageCount.
static void assertMessageCount(RaftServer.Division server) {
String serverId = server.getId().toString();
GrpcService service = (GrpcService) RaftServerTestUtil.getServerRpc(server);
RatisMetricRegistry registry = service.getServerInterceptor().getMetrics().getRegistry();
String counter_prefix = serverId + "_" + "ratis.grpc.RaftServerProtocolService";
Assert.assertTrue(registry.counter(counter_prefix + "_" + "requestVote" + "_OK_completed_total").getCount() > 0);
}
Aggregations