diff --git a/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java b/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java index 4c479ba30d..7693c3946a 100644 --- a/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java +++ b/codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java @@ -290,7 +290,7 @@ public class Http2ConnectionRoundtripTest { return null; } }).when(serverListener).onPingRead(any(ChannelHandlerContext.class), eq(pingData)); - final List receivedDataBuffers = new ArrayList(); + final List receivedDataBuffers = Collections.synchronizedList(new ArrayList(NUM_STREAMS)); doAnswer(new Answer() { @Override public Void answer(InvocationOnMock in) throws Throwable {