From 920cd2f477e2c2b859ade6ea8056b4149bf787dc Mon Sep 17 00:00:00 2001 From: eyalkoren <41850454+eyalkoren@users.noreply.github.com> Date: Mon, 19 Aug 2019 15:06:27 +0300 Subject: [PATCH] Make BlockingQueue API test less flaky --- .../apm/api/BlockingQueueContextPropagationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/BlockingQueueContextPropagationTest.java b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/BlockingQueueContextPropagationTest.java index f391642325..cd996cac33 100644 --- a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/BlockingQueueContextPropagationTest.java +++ b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/BlockingQueueContextPropagationTest.java @@ -105,7 +105,7 @@ public void testAsyncTransactionDelegation() throws ExecutionException, Interrup assertThat(reportedTransaction.getTimestamp()).isEqualTo(startTime); assertThat(reportedTransaction.getDuration()).isBetween( TimeUnit.MILLISECONDS.toMicros(110), - TimeUnit.MILLISECONDS.toMicros(150) + TimeUnit.MILLISECONDS.toMicros(170) ); assertThat(reporter.getSpans()).isEmpty(); } @@ -135,7 +135,7 @@ public void testAsyncSpanDelegation() throws ExecutionException, InterruptedExce assertThat(transactionTimestamp).isEqualTo(startTime); assertThat(reportedTransaction.getDuration()).isBetween( TimeUnit.MILLISECONDS.toMicros(0), - TimeUnit.MILLISECONDS.toMicros(50) + TimeUnit.MILLISECONDS.toMicros(70) ); co.elastic.apm.agent.impl.transaction.Span reportedSpan = reporter.getFirstSpan(); @@ -145,7 +145,7 @@ public void testAsyncSpanDelegation() throws ExecutionException, InterruptedExce assertThat(reportedSpan.getTimestamp() - transactionTimestamp).isGreaterThanOrEqualTo(TimeUnit.MILLISECONDS.toMicros(100)); assertThat(reportedSpan.getDuration()).isBetween( TimeUnit.MILLISECONDS.toMicros(10), - TimeUnit.MILLISECONDS.toMicros(50) + TimeUnit.MILLISECONDS.toMicros(70) ); }