diff --git a/dd-java-agent/instrumentation/couchbase/couchbase-2.0/src/test/groovy/util/AbstractCouchbaseTest.groovy b/dd-java-agent/instrumentation/couchbase/couchbase-2.0/src/test/groovy/util/AbstractCouchbaseTest.groovy index 4e5ee67828a..2f42bc63f9f 100644 --- a/dd-java-agent/instrumentation/couchbase/couchbase-2.0/src/test/groovy/util/AbstractCouchbaseTest.groovy +++ b/dd-java-agent/instrumentation/couchbase/couchbase-2.0/src/test/groovy/util/AbstractCouchbaseTest.groovy @@ -114,25 +114,17 @@ abstract class AbstractCouchbaseTest extends VersionedNamingTestBase { } protected void cleanupCluster(CouchbaseAsyncCluster cluster, CouchbaseEnvironment environment) { - def cleanupSpan = runUnderTrace("cleanup") { - try { - cluster?.disconnect()?.timeout(10, TimeUnit.SECONDS)?.toBlocking()?.single() - environment.shutdown() - } catch (Throwable ex) { - // ignore - } - activeSpan() + try (def suppressScope = TEST_TRACER.muteTracing()) { + cluster?.disconnect()?.timeout(10, TimeUnit.SECONDS)?.toBlocking()?.single() + environment.shutdown() } - TEST_WRITER.waitUntilReported(cleanupSpan as DDSpan, 60, TimeUnit.SECONDS) } protected void cleanupCluster(CouchbaseCluster cluster, CouchbaseEnvironment environment) { - def cleanupSpan = runUnderTrace("cleanup") { + try (def suppressScope = TEST_TRACER.muteTracing()) { cluster?.disconnect() environment.shutdown() - activeSpan() } - TEST_WRITER.waitUntilReported(cleanupSpan as DDSpan) } void assertCouchbaseCall(TraceAssert trace, String name, String bucketName = null, Object parentSpan = null) {