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.
This commit is contained in:
Nikolay Martynov 2019-01-08 12:30:18 -05:00
parent 06bd670f0a
commit 354cbfcb2d
1 changed files with 3 additions and 3 deletions

View File

@ -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")