Skip to content

Commit e816b50

Browse files
committed
try to fix netty test
1 parent 5fd4cf2 commit e816b50

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ServerTest.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ abstract class Netty41ServerTest extends HttpServerTest<EventLoopGroup> {
175175
it.flush()
176176
},
177177
userEventTriggered : { ChannelHandlerContext ctx, Object evt ->
178+
System.out.println("Received event $evt. session is ${WsEndpoint.activeSession}")
178179
if (evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {
179180
WsEndpoint.onOpen(ctx)
180181
}
@@ -285,6 +286,10 @@ abstract class Netty41ServerTest extends HttpServerTest<EventLoopGroup> {
285286
boolean testBadUrl() {
286287
false
287288
}
289+
290+
def cleanup() {
291+
WsEndpoint.activeSession = null
292+
}
288293
}
289294

290295
class Netty41ServerV0Test extends Netty41ServerTest implements TestingNettyHttpNamingConventions.ServerV0 {
@@ -310,5 +315,3 @@ class WsEndpoint {
310315
activeSession = null
311316
}
312317
}
313-
314-

0 commit comments

Comments
 (0)