Attempt to remove span-ordering race condition with NettyClientTest
MODIFY
dd-java-agent/instrumentation/netty-4.0/src/test/groovy/Netty40ClientTest.groovy
dd-java-agent/instrumentation/netty-4.0/src/test/groovy/Netty40ClientTest.groovy
@@ -36,6 +36,7 @@ class Netty40ClientTest extends HttpClientTest<NettyHttpClientDecorator> {
return response
}
}).get()
+ blockUntilChildSpansFinished(1)
return response.statusCode
}

MODIFY
dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ClientTest.groovy
dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ClientTest.groovy
@@ -44,6 +44,7 @@ class Netty41ClientTest extends HttpClientTest<NettyHttpClientDecorator> {
return response
}
}).get()
+ blockUntilChildSpansFinished(1)
return response.statusCode
}
@@ -219,24 +220,30 @@ class Netty41ClientTest extends HttpClientTest<NettyHttpClientDecorator> {
class SimpleHandler implements ChannelHandler {
@Override
- void handlerAdded(ChannelHandlerContext ctx) throws Exception {}
+ void handlerAdded(ChannelHandlerContext ctx) throws Exception {
+ }
@Override
- void handlerRemoved(ChannelHandlerContext ctx) throws Exception {}
+ void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
+ }
@Override
- void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {}
+ void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+ }
}
class OtherSimpleHandler implements ChannelHandler {
@Override
- void handlerAdded(ChannelHandlerContext ctx) throws Exception {}
+ void handlerAdded(ChannelHandlerContext ctx) throws Exception {
+ }
@Override
- void handlerRemoved(ChannelHandlerContext ctx) throws Exception {}
+ void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
+ }
@Override
- void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {}
+ void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+ }
}
class TracedHandlerFromInitializerHandler extends ChannelInitializer<Channel> implements ChannelHandler {

Attempt to remove span-ordering race condition with NettyClientTest