Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into opencensus-2-lro-co…
Browse files Browse the repository at this point in the history
…ntext
  • Loading branch information
igorbernstein2 committed Oct 10, 2018
2 parents e9bbb95 + b842b23 commit 70cb018
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gax/src/test/java/com/google/api/gax/rpc/AttemptCallableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,18 @@ public void testRpcTimeout() {
callable.call();
assertThat(capturedCallContext.getValue().getTimeout()).isEqualTo(longerTimeout);
}

@Test
public void testRpcTimeoutIsNotErased() {
Duration callerTimeout = Duration.ofMillis(10);
ApiCallContext callerCallContext = FakeCallContext.createDefault().withTimeout(callerTimeout);

AttemptCallable<String, String> callable =
new AttemptCallable<>(mockInnerCallable, "fake-request", callerCallContext);
callable.setExternalFuture(mockExternalFuture);

callable.call();

assertThat(capturedCallContext.getValue().getTimeout()).isEqualTo(callerTimeout);
}
}

0 comments on commit 70cb018

Please sign in to comment.