From d53d3fe4c8cbcb655660fe3797d1cf0848f891f2 Mon Sep 17 00:00:00 2001 From: Tyler Benson Date: Wed, 27 Feb 2019 20:56:47 -0800 Subject: [PATCH] Add @Retry to tests that fail randomly in CI. Should eventually revisit this to try and remove them. Latest failure was on: ``` at ExecutorInstrumentationTest.#poolImpl '#name' reports after canceled jobs(ExecutorInstrumentationTest.groovy:202) ``` --- .../src/test/groovy/AkkaExecutorInstrumentationTest.groovy | 2 ++ .../src/test/groovy/ScalaExecutorInstrumentationTest.groovy | 2 ++ .../src/test/groovy/ExecutorInstrumentationTest.groovy | 2 ++ 3 files changed, 6 insertions(+) diff --git a/dd-java-agent/instrumentation/java-concurrent/akka-2.5-testing/src/test/groovy/AkkaExecutorInstrumentationTest.groovy b/dd-java-agent/instrumentation/java-concurrent/akka-2.5-testing/src/test/groovy/AkkaExecutorInstrumentationTest.groovy index d2e337da5f..5507b6fa7a 100644 --- a/dd-java-agent/instrumentation/java-concurrent/akka-2.5-testing/src/test/groovy/AkkaExecutorInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/java-concurrent/akka-2.5-testing/src/test/groovy/AkkaExecutorInstrumentationTest.groovy @@ -5,6 +5,7 @@ import datadog.opentracing.scopemanager.ContinuableScope import datadog.trace.agent.test.AgentTestRunner import datadog.trace.api.Trace import io.opentracing.util.GlobalTracer +import spock.lang.Retry import spock.lang.Shared import java.lang.reflect.InvocationTargetException @@ -19,6 +20,7 @@ import java.util.concurrent.TimeUnit * Test executor instrumentation for Akka specific classes. * This is to large extent a copy of ExecutorInstrumentationTest. */ +@Retry class AkkaExecutorInstrumentationTest extends AgentTestRunner { @Shared diff --git a/dd-java-agent/instrumentation/java-concurrent/scala-testing/src/test/groovy/ScalaExecutorInstrumentationTest.groovy b/dd-java-agent/instrumentation/java-concurrent/scala-testing/src/test/groovy/ScalaExecutorInstrumentationTest.groovy index 78780d8fb1..517c2e6c6b 100644 --- a/dd-java-agent/instrumentation/java-concurrent/scala-testing/src/test/groovy/ScalaExecutorInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/java-concurrent/scala-testing/src/test/groovy/ScalaExecutorInstrumentationTest.groovy @@ -5,6 +5,7 @@ import datadog.trace.api.Trace import io.opentracing.util.GlobalTracer import scala.concurrent.forkjoin.ForkJoinPool import scala.concurrent.forkjoin.ForkJoinTask +import spock.lang.Retry import spock.lang.Shared import java.lang.reflect.InvocationTargetException @@ -19,6 +20,7 @@ import java.util.concurrent.TimeUnit * Test executor instrumentation for Scala specific classes. * This is to large extent a copy of ExecutorInstrumentationTest. */ +@Retry class ScalaExecutorInstrumentationTest extends AgentTestRunner { @Shared diff --git a/dd-java-agent/instrumentation/java-concurrent/src/test/groovy/ExecutorInstrumentationTest.groovy b/dd-java-agent/instrumentation/java-concurrent/src/test/groovy/ExecutorInstrumentationTest.groovy index 2897f02d95..5f7313679a 100644 --- a/dd-java-agent/instrumentation/java-concurrent/src/test/groovy/ExecutorInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/java-concurrent/src/test/groovy/ExecutorInstrumentationTest.groovy @@ -5,6 +5,7 @@ import datadog.trace.api.Trace import datadog.trace.bootstrap.instrumentation.java.concurrent.CallableWrapper import datadog.trace.bootstrap.instrumentation.java.concurrent.RunnableWrapper import io.opentracing.util.GlobalTracer +import spock.lang.Retry import spock.lang.Shared import java.lang.reflect.InvocationTargetException @@ -18,6 +19,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor import java.util.concurrent.ThreadPoolExecutor import java.util.concurrent.TimeUnit +@Retry class ExecutorInstrumentationTest extends AgentTestRunner { @Shared