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.
This commit is contained in:
Scott Mitchell 2015-08-27 15:21:30 -07:00
parent 910ae03792
commit 62d0f7989a
2 changed files with 542 additions and 570 deletions

View File

@ -72,7 +72,7 @@ public class Http2FrameRoundtripTest {
private Bootstrap cb;
private Channel serverChannel;
private Channel clientChannel;
private volatile CountDownLatch requestLatch;
private CountDownLatch requestLatch;
private Http2TestUtil.FrameAdapter serverAdapter;
@Before