Преглед на файлове

Update gRPC adapter test cases

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
master
Eric Zhao преди 6 години
родител
ревизия
d29c4ca9c9
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. +2
    -2
      sentinel-adapter/sentinel-grpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/grpc/SentinelGrpcClientInterceptorTest.java
  2. +2
    -2
      sentinel-adapter/sentinel-grpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/grpc/SentinelGrpcServerInterceptorTest.java

+ 2
- 2
sentinel-adapter/sentinel-grpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/grpc/SentinelGrpcClientInterceptorTest.java Целия файл

@@ -65,14 +65,14 @@ public class SentinelGrpcClientInterceptorTest {
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();
}


+ 2
- 2
sentinel-adapter/sentinel-grpc-adapter/src/test/java/com/alibaba/csp/sentinel/adapter/grpc/SentinelGrpcServerInterceptorTest.java Целия файл

@@ -66,14 +66,14 @@ public class SentinelGrpcServerInterceptorTest {
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();
}


Loading…
Отказ
Запис