Home
last modified time | relevance | path

Searched refs:statusCaptor (Results 1 – 14 of 14) sorted by relevance

/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DHttp2ClientStreamTransportStateTest.java55 @Captor private ArgumentCaptor<Status> statusCaptor; field in Http2ClientStreamTransportStateTest
112 verify(mockListener).closed(statusCaptor.capture(), same(PROCESSED), same(headers)); in transportHeadersReceived_noHttpStatus()
113 assertEquals(Code.INTERNAL, statusCaptor.getValue().getCode()); in transportHeadersReceived_noHttpStatus()
127 verify(mockListener).closed(statusCaptor.capture(), same(PROCESSED), same(headers)); in transportHeadersReceived_wrongContentType_200()
128 assertEquals(Code.UNKNOWN, statusCaptor.getValue().getCode()); in transportHeadersReceived_wrongContentType_200()
129 assertTrue(statusCaptor.getValue().getDescription().contains("200")); in transportHeadersReceived_wrongContentType_200()
143 verify(mockListener).closed(statusCaptor.capture(), same(PROCESSED), same(headers)); in transportHeadersReceived_wrongContentType_401()
144 assertEquals(Code.UNAUTHENTICATED, statusCaptor.getValue().getCode()); in transportHeadersReceived_wrongContentType_401()
145 assertTrue(statusCaptor.getValue().getDescription().contains("401")); in transportHeadersReceived_wrongContentType_401()
146 assertTrue(statusCaptor.getValue().getDescription().contains("text/html")); in transportHeadersReceived_wrongContentType_401()
[all …]
DAbstractClientStreamTest.java333 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in rstStreamClosesStream() local
335 .closed(statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in rstStreamClosesStream()
336 assertSame(Status.Code.INTERNAL, statusCaptor.getValue().getCode()); in rstStreamClosesStream()
337 assertEquals("rst___stream", statusCaptor.getValue().getDescription()); in rstStreamClosesStream()
350 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in trailerOkWithTruncatedMessage() local
352 .closed(statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in trailerOkWithTruncatedMessage()
353 assertSame(Status.Code.INTERNAL, statusCaptor.getValue().getCode()); in trailerOkWithTruncatedMessage()
354 assertEquals("Encountered end-of-stream mid-frame", statusCaptor.getValue().getDescription()); in trailerOkWithTruncatedMessage()
368 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in trailerNotOkWithTruncatedMessage() local
370 .closed(statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in trailerNotOkWithTruncatedMessage()
[all …]
DServerCallImplTest.java237 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in sendMessage_serverSendsOne_closeOnSecondCall() local
238 verify(stream, times(1)).cancel(statusCaptor.capture()); in sendMessage_serverSendsOne_closeOnSecondCall()
239 assertEquals(Status.Code.INTERNAL, statusCaptor.getValue().getCode()); in sendMessage_serverSendsOne_closeOnSecondCall()
240 assertEquals(ServerCallImpl.TOO_MANY_RESPONSES, statusCaptor.getValue().getDescription()); in sendMessage_serverSendsOne_closeOnSecondCall()
301 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in serverSendsOne_okFailsOnMissingResponse() local
302 verify(stream, times(1)).cancel(statusCaptor.capture()); in serverSendsOne_okFailsOnMissingResponse()
303 assertEquals(Status.Code.INTERNAL, statusCaptor.getValue().getCode()); in serverSendsOne_okFailsOnMissingResponse()
304 assertEquals(ServerCallImpl.MISSING_RESPONSE, statusCaptor.getValue().getDescription()); in serverSendsOne_okFailsOnMissingResponse()
DClientCallImplTest.java103 @Captor private ArgumentCaptor<Status> statusCaptor; field in ClientCallImplTest
670 verify(callListener, timeout(1000)).onClose(statusCaptor.capture(), any(Metadata.class)); in deadlineExceededBeforeCallStarted()
671 assertEquals(Status.Code.DEADLINE_EXCEEDED, statusCaptor.getValue().getCode()); in deadlineExceededBeforeCallStarted()
801 verify(stream, times(1)).cancel(statusCaptor.capture()); in expiredDeadlineCancelsStream_CallOptions()
802 assertEquals(Status.Code.DEADLINE_EXCEEDED, statusCaptor.getValue().getCode()); in expiredDeadlineCancelsStream_CallOptions()
828 verify(stream, times(1)).cancel(statusCaptor.capture()); in expiredDeadlineCancelsStream_Context()
829 assertEquals(Status.Code.DEADLINE_EXCEEDED, statusCaptor.getValue().getCode()); in expiredDeadlineCancelsStream_Context()
850 verify(stream, times(1)).cancel(statusCaptor.capture()); in streamCancelAbortsDeadlineTimer()
852 assertEquals(Status.CANCELLED.getCode(), statusCaptor.getValue().getCode()); in streamCancelAbortsDeadlineTimer()
906 verify(stream).cancel(statusCaptor.capture()); in cancelInOnMessageShouldInvokeStreamCancel()
[all …]
DDelayedClientTransportTest.java78 @Captor private ArgumentCaptor<Status> statusCaptor; field in DelayedClientTransportTest
234 statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in newStreamThenShutdownTransportThenAssignTransport()
235 assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode()); in newStreamThenShutdownTransportThenAssignTransport()
262 statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in shutdownThenNewStream()
263 assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode()); in shutdownThenNewStream()
272 verify(streamListener).closed(statusCaptor.capture(), any(Metadata.class)); in startStreamThenShutdownNow()
273 assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode()); in startStreamThenShutdownNow()
283 statusCaptor.capture(), any(RpcProgress.class), any(Metadata.class)); in shutdownNowThenNewStream()
284 assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode()); in shutdownNowThenNewStream()
DKeepAliveManagerTest.java51 private ArgumentCaptor<Status> statusCaptor; field in KeepAliveManagerTest
141 verify(transport).shutdownNow(statusCaptor.capture()); in clientKeepAlivePinger_pingTimeout()
142 Status status = statusCaptor.getValue(); in clientKeepAlivePinger_pingTimeout()
159 verify(transport).shutdownNow(statusCaptor.capture()); in clientKeepAlivePinger_pingFailure()
160 Status status = statusCaptor.getValue(); in clientKeepAlivePinger_pingFailure()
DServerImplTest.java182 private ArgumentCaptor<Status> statusCaptor; field in ServerImplTest
422 verify(stream).close(statusCaptor.capture(), any(Metadata.class)); in methodNotFound()
423 Status status = statusCaptor.getValue(); in methodNotFound()
429 assertEquals(Status.Code.UNIMPLEMENTED, statusCaptor.getValue().getCode()); in methodNotFound()
448 verify(stream).close(statusCaptor.capture(), any(Metadata.class)); in decompressorNotFound()
449 Status status = statusCaptor.getValue(); in decompressorNotFound()
1347 verify(stream).close(statusCaptor.capture(), metadataCaptor.capture()); in ensureServerStateNotLeaked()
1348 assertEquals(Status.UNKNOWN, statusCaptor.getValue()); in ensureServerStateNotLeaked()
1349 assertNull(statusCaptor.getValue().getCause()); in ensureServerStateNotLeaked()
DManagedChannelImplTest.java177 private ArgumentCaptor<Status> statusCaptor; field in ManagedChannelImplTest
307 verify(mockCallListener).onClose(statusCaptor.capture(), any(Metadata.class)); in immediateDeadlineExceeded()
308 Status status = statusCaptor.getValue(); in immediateDeadlineExceeded()
496 verify(mockCallListener3).onClose(statusCaptor.capture(), any(Metadata.class)); in subtestCallsAndShutdown()
497 assertSame(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode()); in subtestCallsAndShutdown()
769 verify(mockLoadBalancer).handleNameResolutionError(statusCaptor.capture()); in nameResolverReturnsEmptySubLists()
770 Status status = statusCaptor.getValue(); in nameResolverReturnsEmptySubLists()
1238 verify(mockCallListener4).onClose(statusCaptor.capture(), any(Metadata.class)); in oobchannels()
1239 Status status4 = statusCaptor.getValue(); in oobchannels()
1241 verify(mockCallListener5).onClose(statusCaptor.capture(), any(Metadata.class)); in oobchannels()
[all …]
DRetriableStreamTest.java474 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in cancel_closed() local
475 verify(mockStream1).cancel(statusCaptor.capture()); in cancel_closed()
476 assertEquals(Status.CANCELLED.getCode(), statusCaptor.getValue().getCode()); in cancel_closed()
477 assertEquals(CANCELLED_BECAUSE_COMMITTED, statusCaptor.getValue().getDescription()); in cancel_closed()
513 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in retry_cancel_closed() local
514 verify(mockStream2).cancel(statusCaptor.capture()); in retry_cancel_closed()
515 assertEquals(Status.CANCELLED.getCode(), statusCaptor.getValue().getCode()); in retry_cancel_closed()
516 assertEquals(CANCELLED_BECAUSE_COMMITTED, statusCaptor.getValue().getDescription()); in retry_cancel_closed()
DCensusModulesTest.java172 private ArgumentCaptor<Status> statusCaptor; field in CensusModulesTest
308 verify(mockClientCallListener).onClose(statusCaptor.capture(), any(Metadata.class)); in testClientInterceptors()
309 Status status = statusCaptor.getValue(); in testClientInterceptors()
/external/grpc-grpc-java/cronet/src/test/java/io/grpc/cronet/
DCronetClientStreamTest.java325 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in streamSucceeded() local
327 .closed(statusCaptor.capture(), isA(RpcProgress.class), trailerCaptor.capture()); in streamSucceeded()
330 Status status = statusCaptor.getValue(); in streamSucceeded()
369 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in streamSucceededWithGrpcError() local
371 .closed(statusCaptor.capture(), isA(RpcProgress.class), isA(Metadata.class)); in streamSucceededWithGrpcError()
373 Status status = statusCaptor.getValue(); in streamSucceededWithGrpcError()
395 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in streamFailed() local
397 .closed(statusCaptor.capture(), isA(RpcProgress.class), isA(Metadata.class)); in streamFailed()
398 Status status = statusCaptor.getValue(); in streamFailed()
423 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in streamFailedAfterResponseHeaderReceived() local
[all …]
/external/grpc-grpc-java/auth/src/test/java/io/grpc/auth/
DGoogleAuthLibraryCallCredentialsTest.java98 private ArgumentCaptor<Status> statusCaptor; field in GoogleAuthLibraryCallCredentialsTest
183 verify(applier).fail(statusCaptor.capture()); in invalidBase64()
184 Status status = statusCaptor.getValue(); in invalidBase64()
199 verify(applier).fail(statusCaptor.capture()); in credentialsFailsWithIoException()
200 Status status = statusCaptor.getValue(); in credentialsFailsWithIoException()
215 verify(applier).fail(statusCaptor.capture()); in credentialsFailsWithRuntimeException()
216 Status status = statusCaptor.getValue(); in credentialsFailsWithRuntimeException()
309 verify(applier).fail(statusCaptor.capture()); in googleCredential_integrityDenied()
310 Status status = statusCaptor.getValue(); in googleCredential_integrityDenied()
329 verify(applier).fail(statusCaptor.capture()); in googleCredential_nullSecurityDenied()
[all …]
DClientAuthInterceptorTest.java137 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in testCredentialsThrows() local
138 Mockito.verify(listener).onClose(statusCaptor.capture(), isA(Metadata.class)); in testCredentialsThrows()
142 Assert.assertEquals(Status.Code.UNAUTHENTICATED, statusCaptor.getValue().getCode()); in testCredentialsThrows()
143 Assert.assertNotNull(statusCaptor.getValue().getCause()); in testCredentialsThrows()
/external/grpc-grpc-java/testing/src/main/java/io/grpc/internal/testing/
DAbstractTransportTest.java297 ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class); in serverNotListening() local
298 inOrder.verify(mockClientTransportListener).transportShutdown(statusCaptor.capture()); in serverNotListening()
299 assertCodeEquals(Status.UNAVAILABLE, statusCaptor.getValue()); in serverNotListening()