Skip to content

Commit 62d0f79

Browse files
committed
HTTP/2 InboundHttp2ToHttpAdapterTest race condition
Motivation: The latches in InboundHttp2ToHttpAdapterTest were volatile and reset during the tests. This resulted in race conditions and sometimes the tests would be waiting on old latches that were not the same latches being counted down when messages were received. Modifications: - Remove volatile latches from tests Result: More reliable tests with less race conditions.
1 parent 910ae03 commit 62d0f79

File tree

2 files changed

+110
-138
lines changed

2 files changed

+110
-138
lines changed

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class Http2FrameRoundtripTest {
7272
private Bootstrap cb;
7373
private Channel serverChannel;
7474
private Channel clientChannel;
75-
private volatile CountDownLatch requestLatch;
75+
private CountDownLatch requestLatch;
7676
private Http2TestUtil.FrameAdapter serverAdapter;
7777

7878
@Before

0 commit comments

Comments
 (0)