Fix intermittent test failure
This commit is contained in:
parent
5218f38ed0
commit
00e059b064
@ -27,7 +27,7 @@ import org.junit.Test;
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.SynchronousQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
@ -111,7 +111,7 @@ public class SocketShutdownOutputByPeerTest extends AbstractServerSocketTest {
|
||||
|
||||
private static class TestHandler extends ChannelInboundByteHandlerAdapter {
|
||||
volatile SocketChannel ch;
|
||||
final BlockingQueue<Byte> queue = new SynchronousQueue<Byte>();
|
||||
final BlockingQueue<Byte> queue = new LinkedBlockingQueue<Byte>();
|
||||
final CountDownLatch halfClosure = new CountDownLatch(1);
|
||||
final CountDownLatch closure = new CountDownLatch(1);
|
||||
final AtomicInteger halfClosureCount = new AtomicInteger();
|
||||
|
@ -26,7 +26,7 @@ import org.junit.Test;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.SynchronousQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@ -79,7 +79,7 @@ public class SocketShutdownOutputBySelfTest extends AbstractClientSocketTest {
|
||||
|
||||
private static class TestHandler extends ChannelInboundByteHandlerAdapter {
|
||||
volatile SocketChannel ch;
|
||||
final BlockingQueue<Byte> queue = new SynchronousQueue<Byte>();
|
||||
final BlockingQueue<Byte> queue = new LinkedBlockingQueue<Byte>();
|
||||
|
||||
@Override
|
||||
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user