Search in sources :

Example 6 with FakeApiClock

use of com.google.api.gax.core.FakeApiClock in project gax-java by googleapis.

the class RetryingTest method resetClock.

@Before
public void resetClock() {
    fakeClock = new FakeApiClock(System.nanoTime());
    executor = RecordingScheduler.create(fakeClock);
    clientContext = ClientContext.newBuilder().setExecutor(executor).setClock(fakeClock).setDefaultCallContext(HttpJsonCallContext.createDefault()).build();
}
Also used : FakeApiClock(com.google.api.gax.core.FakeApiClock) Before(org.junit.Before)

Aggregations

FakeApiClock (com.google.api.gax.core.FakeApiClock)6 Before (org.junit.Before)6 FakeChannel (com.google.api.gax.rpc.testing.FakeChannel)3 OperationSnapshot (com.google.api.gax.longrunning.OperationSnapshot)2 TransportChannel (com.google.api.gax.rpc.TransportChannel)1 TransportChannelProvider (com.google.api.gax.rpc.TransportChannelProvider)1 FakeOperationSnapshot (com.google.api.gax.rpc.testing.FakeOperationSnapshot)1 FakeTransportChannel (com.google.api.gax.rpc.testing.FakeTransportChannel)1 OperationsSettings (com.google.longrunning.OperationsSettings)1 Color (com.google.type.Color)1 Money (com.google.type.Money)1 ManagedChannel (io.grpc.ManagedChannel)1 Color (java.awt.Color)1 Currency (java.util.Currency)1