Skip to content

Commit

Permalink
Fixed a test failure where OioSocketServerBootstrapTest blocks indefi…
Browse files Browse the repository at this point in the history
…nitely
  • Loading branch information
trustin committed Aug 19, 2009
1 parent b0bdef6 commit c861adf
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.junit.Assert.*;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.concurrent.Executor;
Expand Down Expand Up @@ -109,8 +110,12 @@ public static void destroy() {
public void testFailedBindAttempt() throws Exception {
ServerBootstrap bootstrap = new ServerBootstrap();
bootstrap.setFactory(newServerSocketChannelFactory(executor));
bootstrap.setOption("localAddress", new InetSocketAddress("255.255.255.255", 0));
bootstrap.bind();
bootstrap.setOption(
"localAddress",
new InetSocketAddress(
InetAddress.getByAddress(new byte[] { -1, -1, -1, -1 }),
0));
bootstrap.bind().close().awaitUninterruptibly();
}

@Test(timeout = 30000)
Expand Down

0 comments on commit c861adf

Please sign in to comment.