aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-proxy
diff options
context:
space:
mode:
authorolivier lamy <olamy@apache.org>2017-05-12 16:19:41 +1000
committerolivier lamy <olamy@apache.org>2017-05-12 16:19:41 +1000
commite9376eeb6d72fbd83ed893c9b1ddfa57cb7220f6 (patch)
treec79e71ec95661e73c9cc75ba3086d55e10a20ffd /archiva-modules/archiva-base/archiva-proxy
parent3c036f325b442deea22f8e6e8d76f056fca1147c (diff)
downloadarchiva-e9376eeb6d72fbd83ed893c9b1ddfa57cb7220f6.tar.gz
archiva-e9376eeb6d72fbd83ed893c9b1ddfa57cb7220f6.zip
migrate all tests to jetty 9.4
Signed-off-by: olivier lamy <olamy@apache.org>
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy')
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
index f0ca4f596..d85d5016e 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
@@ -38,8 +38,10 @@ import org.apache.archiva.policies.SnapshotsPolicy;
import org.apache.archiva.repository.ManagedRepositoryContent;
import org.assertj.core.api.Assertions;
import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.junit.After;
import org.junit.Before;
@@ -164,11 +166,13 @@ public class HttpProxyTransferTest
}
};
- server = new Server( 0 );
+ server = new Server( );
+ ServerConnector serverConnector = new ServerConnector( server, new HttpConnectionFactory());
+ server.addConnector( serverConnector );
server.setHandler( handler );
server.start();
- int port = server.getConnectors()[0].getLocalPort();
+ int port = serverConnector.getLocalPort();
NetworkProxyConfiguration proxyConfig = new NetworkProxyConfiguration();
proxyConfig.setHost( "localhost" );