Revert "Fixing #2597 - Disabling UnixSocketTest on Windows"
This reverts commit fac63f4
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
d82b9a2f89
commit
fe0f1e603b
|
@ -18,8 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.unixsocket;
|
||||
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
|
@ -37,7 +36,6 @@ import org.eclipse.jetty.server.HttpConnectionFactory;
|
|||
import org.eclipse.jetty.server.Request;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.toolchain.test.OS;
|
||||
import org.eclipse.jetty.unixsocket.client.HttpClientTransportOverUnixSockets;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
|
@ -45,11 +43,13 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
import org.hamcrest.Matchers;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class UnixSocketTest
|
||||
{
|
||||
|
||||
private Logger log = Log.getLogger( getClass() );
|
||||
|
||||
Server server;
|
||||
|
@ -61,8 +61,8 @@ public class UnixSocketTest
|
|||
{
|
||||
server = null;
|
||||
httpClient = null;
|
||||
Path targetDir = MavenTestingUtils.getTargetPath();
|
||||
sockFile = Files.createTempFile(targetDir, "unix", ".sock" );
|
||||
sockFile = Files.createTempFile(new File("/tmp").toPath(), "unix", ".sock" );
|
||||
Files.deleteIfExists(sockFile);
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -78,7 +78,7 @@ public class UnixSocketTest
|
|||
@Test
|
||||
public void testUnixSocket() throws Exception
|
||||
{
|
||||
assumeFalse(OS.IS_WINDOWS);
|
||||
Assume.assumeTrue(OS.IS_UNIX);
|
||||
|
||||
server = new Server();
|
||||
|
||||
|
@ -136,9 +136,7 @@ public class UnixSocketTest
|
|||
|
||||
@Test
|
||||
public void testNotLocal() throws Exception
|
||||
{
|
||||
assumeFalse(OS.IS_WINDOWS);
|
||||
|
||||
{
|
||||
httpClient = new HttpClient( new HttpClientTransportOverUnixSockets( sockFile.toString() ), null );
|
||||
httpClient.start();
|
||||
|
||||
|
|
Loading…
Reference in New Issue