Skip to content

Commit 85a32c5

Browse files
Change assert into a println
1 parent 78e3a77 commit 85a32c5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

utils/test-utils/src/main/groovy/datadog/trace/test/util/DDSpecification.groovy

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,16 @@ abstract class DDSpecification extends Specification {
180180
// between test cleanup and these assertions
181181
long deadline = System.currentTimeMillis() + CHECK_TIMEOUT_MS
182182

183-
while (System.currentTimeMillis() < deadline && !getDDThreads().isEmpty()) {
183+
Set<Thread> threads = getDDThreads()
184+
while (System.currentTimeMillis() < deadline && !threads.isEmpty()) {
184185
Thread.sleep(100)
186+
threads = getDDThreads()
185187
}
186188

187-
assert getDDThreads().isEmpty(): "DD threads still active. Forget to close() a tracer?"
189+
if (!threads.isEmpty()) {
190+
println("WARNING: DD threads still active. Forget to close() a tracer?")
191+
println threads.collect { it.name }
192+
}
188193
}
189194

190195
void injectSysConfig(String name, String value) {

0 commit comments

Comments
 (0)