File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
main/java/tech/ydb/core/impl
test/java/tech/ydb/core/impl/pool Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,9 @@ private class ChannelStatusHandler implements GrpcStatusHandler {
243243 @ Override
244244 public void accept (io .grpc .Status status , Metadata trailers ) {
245245 // Usually CANCELLED is received when ClientCall is canceled on client side
246- if (!status .isOk () && status .getCode () != io .grpc .Status .Code .CANCELLED ) {
246+ if (!status .isOk () && status .getCode () != io .grpc .Status .Code .CANCELLED
247+ && status .getCode () != io .grpc .Status .Code .DEADLINE_EXCEEDED
248+ && status .getCode () != io .grpc .Status .Code .RESOURCE_EXHAUSTED ) {
247249 pessimizeEndpoint (channel .getEndpoint (), "by grpc code " + status .getCode ());
248250 }
249251
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ public class EndpointPoolTest {
3939
4040 @ Before
4141 public void setUp () throws IOException {
42- Mockito .when (socketFactory .createSocket ()).thenReturn (socket );
43- Mockito .doNothing ().when (socket ).connect (Mockito .any (SocketAddress .class ));
4442 mocks = MockitoAnnotations .openMocks (this );
4543 threadLocalStaticMock .when (ThreadLocalRandom ::current ).thenReturn (random );
4644 socketFactoryStaticMock .when (SocketFactory ::getDefault ).thenReturn (socketFactory );
45+ Mockito .when (socketFactory .createSocket ()).thenReturn (socket );
46+ Mockito .doNothing ().when (socket ).connect (Mockito .any (SocketAddress .class ));
4747 }
4848
4949 @ After
You can’t perform that action at this time.
0 commit comments