Search in sources :

Example 1 with RaftServerRpc

use of org.apache.ratis.server.RaftServerRpc in project incubator-ratis by apache.

the class TestRaftServerWithGrpc method runTestUnsupportedMethods.

void runTestUnsupportedMethods(MiniRaftClusterWithGrpc cluster) throws Exception {
    final RaftPeerId leaderId = RaftTestUtil.waitForLeader(cluster).getId();
    final RaftServerRpc rpc = cluster.getServerFactory(leaderId).newRaftServerRpc(cluster.getServer(leaderId));
    testFailureCase("appendEntries", () -> rpc.appendEntries(null), UnsupportedOperationException.class);
    testFailureCase("installSnapshot", () -> rpc.installSnapshot(null), UnsupportedOperationException.class);
}
Also used : RaftPeerId(org.apache.ratis.protocol.RaftPeerId) RaftServerRpc(org.apache.ratis.server.RaftServerRpc)

Aggregations

RaftPeerId (org.apache.ratis.protocol.RaftPeerId)1 RaftServerRpc (org.apache.ratis.server.RaftServerRpc)1