socket.reuse-address on windows doesn't work from ServerConnector
This commit is contained in:
parent
c17f1982be
commit
084a307ea1
|
@ -45,6 +45,7 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.server.handler.DefaultHandler;
|
||||
import org.eclipse.jetty.server.handler.HandlerList;
|
||||
import org.eclipse.jetty.toolchain.test.OS;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -129,7 +130,12 @@ public class ServerConnectorTest
|
|||
String response = getResponse(uri);
|
||||
assertThat("Response",response,containsString("connector.getReuseAddress() = true"));
|
||||
assertThat("Response",response,containsString("connector._reuseAddress() = true"));
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = true"));
|
||||
|
||||
// Java on Windows is incapable of propagating reuse-address this to the opened socket.
|
||||
if (!OS.IS_WINDOWS)
|
||||
{
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = true"));
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -160,7 +166,12 @@ public class ServerConnectorTest
|
|||
String response = getResponse(uri);
|
||||
assertThat("Response",response,containsString("connector.getReuseAddress() = true"));
|
||||
assertThat("Response",response,containsString("connector._reuseAddress() = true"));
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = true"));
|
||||
|
||||
// Java on Windows is incapable of propagating reuse-address this to the opened socket.
|
||||
if (!OS.IS_WINDOWS)
|
||||
{
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = true"));
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -191,7 +202,12 @@ public class ServerConnectorTest
|
|||
String response = getResponse(uri);
|
||||
assertThat("Response",response,containsString("connector.getReuseAddress() = false"));
|
||||
assertThat("Response",response,containsString("connector._reuseAddress() = false"));
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = false"));
|
||||
|
||||
// Java on Windows is incapable of propagating reuse-address this to the opened socket.
|
||||
if (!OS.IS_WINDOWS)
|
||||
{
|
||||
assertThat("Response",response,containsString("socket.getReuseAddress() = false"));
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue