Fixing race condition in HTTP/2 test
Motivation: InboundHttp2ToHttpAdapterTest swaps non-volatile CountDownLatches in handlers, which seems to cause a race condition that can lead to missing messages. Modifications: Make CountDownLatch variables in InboundHttp2ToHttpAdapterTest volatile. Result: InboundHttp2ToHttpAdapterTest should be more stable.
This commit is contained in:
parent
74e72ea752
commit
ad259a456e
@ -699,7 +699,7 @@ public class InboundHttp2ToHttpAdapterTest {
|
|||||||
|
|
||||||
private final class HttpResponseDelegator extends SimpleChannelInboundHandler<HttpObject> {
|
private final class HttpResponseDelegator extends SimpleChannelInboundHandler<HttpObject> {
|
||||||
private final HttpResponseListener listener;
|
private final HttpResponseListener listener;
|
||||||
private CountDownLatch latch;
|
private volatile CountDownLatch latch;
|
||||||
|
|
||||||
public HttpResponseDelegator(HttpResponseListener listener, CountDownLatch latch) {
|
public HttpResponseDelegator(HttpResponseListener listener, CountDownLatch latch) {
|
||||||
super(false);
|
super(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user