Skip to content

Commit

Permalink
Update gRPC adapter test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
  • Loading branch information
sczyh30 committed Nov 12, 2018
1 parent d71e95c commit d29c4ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ public void testGrpcClientInterceptor() throws Exception {
assertTrue(sendRequest(client));
ClusterNode clusterNode = ClusterBuilderSlot.getClusterNode(resourceName, EntryType.OUT);
assertNotNull(clusterNode);
assertEquals(1, clusterNode.passQps());
assertEquals(1, clusterNode.totalRequest() - clusterNode.blockRequest());

// Not allowed to pass.
configureFlowRule(0);

// The second request will be blocked.
assertFalse(sendRequest(client));
assertEquals(1, clusterNode.blockQps());
assertEquals(1, clusterNode.blockRequest());

server.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public void testGrpcServerInterceptor() throws Exception {
assertTrue(sendRequest());
ClusterNode clusterNode = ClusterBuilderSlot.getClusterNode(resourceName, EntryType.IN);
assertNotNull(clusterNode);
assertEquals(1, clusterNode.passQps());
assertEquals(1, clusterNode.totalRequest() - clusterNode.blockRequest());

// Not allowed to pass.
configureFlowRule(0);

// The second request will be blocked.
assertFalse(sendRequest());
assertEquals(1, clusterNode.blockQps());
assertEquals(1, clusterNode.blockRequest());

server.stop();
}
Expand Down

0 comments on commit d29c4ca

Please sign in to comment.