Skip to content

Commit

Permalink
chore(fix): unflake MetricsTracerTest (#313)
Browse files Browse the repository at this point in the history
* chore(fix): unflake MetricsTracerTest

* chore(fix): unflake MetricsTracerTest

* chore(fix): unflake MetricsTracerTest

* chore(fix): unflake MetricsTracerTest

* review feedback

* review feedback
  • Loading branch information
kolea2 committed May 27, 2020
1 parent 7f61f90 commit 29da6de
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -237,7 +237,10 @@ public Object answer(InvocationOnMock invocation) throws Throwable {
getAggregationValueAsLong(
RpcViewConstants.BIGTABLE_READ_ROWS_FIRST_ROW_LATENCY_VIEW,
ImmutableMap.<TagKey, TagValue>of());
assertThat(firstRowLatency).isIn(Range.closed(beforeSleep, elapsed - afterSleep));

// adding buffer time to the upper range to allow for a race between the emulator and the client
// recording the duration
assertThat(firstRowLatency).isIn(Range.closed(beforeSleep, elapsed - afterSleep / 2));
}

@Test
Expand Down

0 comments on commit 29da6de

Please sign in to comment.