diff --git a/dd-java-agent/instrumentation/spymemcached-2.12/src/test/groovy/datadog/trace/instrumentation/spymemcached/SpymemcachedTest.groovy b/dd-java-agent/instrumentation/spymemcached-2.12/src/test/groovy/datadog/trace/instrumentation/spymemcached/SpymemcachedTest.groovy index 6d8ed6d5e0..6403bfda89 100644 --- a/dd-java-agent/instrumentation/spymemcached-2.12/src/test/groovy/datadog/trace/instrumentation/spymemcached/SpymemcachedTest.groovy +++ b/dd-java-agent/instrumentation/spymemcached-2.12/src/test/groovy/datadog/trace/instrumentation/spymemcached/SpymemcachedTest.groovy @@ -14,7 +14,7 @@ import net.spy.memcached.internal.CheckedOperationTimeoutException import net.spy.memcached.ops.Operation import net.spy.memcached.ops.OperationQueueFactory import org.testcontainers.containers.GenericContainer - +import spock.lang.Requires import spock.lang.Shared import java.util.concurrent.ArrayBlockingQueue @@ -30,6 +30,9 @@ import static CompletionListener.SPAN_TYPE import static datadog.trace.agent.test.TestUtils.runUnderTrace import static net.spy.memcached.ConnectionFactoryBuilder.Protocol.BINARY +// Do not run tests locally on Java7 since testcontainers are not compatibly with Java7 +// It is fine to run on CI because CI provides memcached externally, not through testcontainers +@Requires({ "true" == System.getenv("CI") || jvm.java8Compatible }) class SpymemcachedTest extends AgentTestRunner { static {