Skip to content

Commit e036f8c

Browse files
authored
Avoid racy indefinite wait in netty ws tests (#10539)
Avoid racy indefinite wait in netty ws tests Co-authored-by: andrea.marziali <andrea.marziali@datadoghq.com>
1 parent cffe9c6 commit e036f8c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ abstract class Netty41ServerTest extends HttpServerTest<EventLoopGroup> {
202202
void awaitConnected() {
203203
while (WsEndpoint.activeSession == null) {
204204
synchronized (WsEndpoint) {
205-
WsEndpoint.wait()
205+
// this can be racy so we need to wait with timeout and retry
206+
WsEndpoint.wait(1_000)
206207
}
207208
}
208209
}

0 commit comments

Comments
 (0)