Concurent instrumentation tests: block thread before starting tracing
Otherwise blocking thread is pretty much useless since we may still
get spans if threads are executed quickly enough.
MODIFY
dd-java-agent/instrumentation/java-concurrent/src/test/java/AsyncChild.java
dd-java-agent/instrumentation/java-concurrent/src/test/java/AsyncChild.java
@@ -31,12 +31,12 @@ public class AsyncChild implements Runnable, Callable {
}
private void runImpl() {
- if (doTraceableWork) {
- asyncChild();
- }
while (blockThread.get()) {
// busy-wait to block thread
}
+ if (doTraceableWork) {
+ asyncChild();
+ }
}
@Trace(operationName = "asyncChild")

Concurent instrumentation tests: block thread before starting tracing

Otherwise blocking thread is pretty much useless since we may still
get spans if threads are executed quickly enough.