mirror of https://github.com/grpc/grpc-java.git
services: fix duration in Binlog test
This commit is contained in:
parent
ed709ff9ff
commit
6cf849a7ce
|
|
@ -878,7 +878,7 @@ public final class BinlogHelperTest {
|
|||
any(Boolean.class),
|
||||
any(CallId.class));
|
||||
Duration timeout = callOptTimeoutCaptor.getValue();
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - timeout.getNanos())
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - Durations.toNanos(timeout))
|
||||
.isAtMost(TimeUnit.MILLISECONDS.toNanos(250));
|
||||
}
|
||||
|
||||
|
|
@ -932,7 +932,7 @@ public final class BinlogHelperTest {
|
|||
any(Boolean.class),
|
||||
any(CallId.class));
|
||||
Duration timeout = callOptTimeoutCaptor.getValue();
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - timeout.getNanos())
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - Durations.toNanos(timeout))
|
||||
.isAtMost(TimeUnit.MILLISECONDS.toNanos(250));
|
||||
}
|
||||
|
||||
|
|
@ -1005,7 +1005,7 @@ public final class BinlogHelperTest {
|
|||
same(CALL_ID));
|
||||
verifyNoMoreInteractions(mockSinkWriter);
|
||||
Duration timeout = timeoutCaptor.getValue();
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - timeout.getNanos())
|
||||
assertThat(TimeUnit.SECONDS.toNanos(1) - Durations.toNanos(timeout))
|
||||
.isAtMost(TimeUnit.MILLISECONDS.toNanos(250));
|
||||
assertSame(clientInitial, actualClientInitial.get());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue