Search in sources :

Example 16 with InternalException

use of com.google.api.gax.rpc.InternalException in project java-firestore by googleapis.

the class WatchTest method queryWatchRetriesOnInternalException.

@Test
public void queryWatchRetriesOnInternalException() throws InterruptedException {
    addQueryListener();
    awaitAddTarget();
    send(addTarget());
    destroy(new InternalException(null, GrpcStatusCode.of(Code.INTERNAL), true));
    awaitAddTarget();
    send(addTarget());
    send(current());
    send(snapshot());
    awaitQuerySnapshot();
}
Also used : InternalException(com.google.api.gax.rpc.InternalException) Test(org.junit.Test)

Aggregations

InternalException (com.google.api.gax.rpc.InternalException)16 Test (org.junit.Test)15 ApiException (com.google.api.gax.rpc.ApiException)7 StatusRuntimeException (io.grpc.StatusRuntimeException)7 MockStreamObserver (com.google.api.gax.grpc.testing.MockStreamObserver)6 PartialResultSet (com.google.spanner.v1.PartialResultSet)3 Duration (org.threeten.bp.Duration)3 ReadRowsRequest (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsRequest)2 ReadRowsResponse (com.google.cloud.bigquery.storage.v1beta1.Storage.ReadRowsResponse)2 ByteString (com.google.protobuf.ByteString)2 BeginTransactionRequest (com.google.spanner.v1.BeginTransactionRequest)2 AbortedException (com.google.api.gax.rpc.AbortedException)1 DeadlineExceededException (com.google.api.gax.rpc.DeadlineExceededException)1 UnavailableException (com.google.api.gax.rpc.UnavailableException)1 BaseServiceException (com.google.cloud.BaseServiceException)1 Stopwatch (com.google.common.base.Stopwatch)1 ExecuteSqlRequest (com.google.spanner.v1.ExecuteSqlRequest)1 RequestOptions (com.google.spanner.v1.RequestOptions)1 ResultSetStats (com.google.spanner.v1.ResultSetStats)1 TransactionOptions (com.google.spanner.v1.TransactionOptions)1