diff options
author | Olivier Lamy <olamy@apache.org> | 2014-04-14 14:08:55 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-04-14 14:08:55 +1000 |
commit | a7a2c9130e30992d3d5dc4e6edac5d1d51034458 (patch) | |
tree | 599ddbeac8fb12a515909bb20d36af9b5d5d74b5 /archiva-modules/archiva-scheduler | |
parent | 64187aa84a22b6721069500239c94a729f1b9add (diff) | |
download | archiva-a7a2c9130e30992d3d5dc4e6edac5d1d51034458.tar.gz archiva-a7a2c9130e30992d3d5dc4e6edac5d1d51034458.zip |
[MRM-1828] upgrade to jetty 9.x
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java index 6a1210d1a..f0c6330f2 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java @@ -18,11 +18,11 @@ package org.apache.archiva.scheduler.indexing; * under the License. */ -import junit.framework.TestCase; import org.apache.archiva.admin.model.beans.RemoteRepository; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; import org.apache.archiva.common.utils.FileUtil; +import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.maven.index.FlatSearchRequest; @@ -32,10 +32,10 @@ import org.apache.maven.index.NexusIndexer; import org.apache.maven.index.expr.StringSearchExpression; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import static org.assertj.core.api.Assertions.assertThat; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -50,13 +50,14 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.concurrent.TimeUnit; -import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; + +import static org.assertj.core.api.Assertions.assertThat; /** * @author Olivier Lamy */ -@RunWith( ArchivaSpringJUnit4ClassRunner.class ) -@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } ) +@RunWith(ArchivaSpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" }) public class DownloadRemoteIndexTaskTest { @@ -86,7 +87,7 @@ public class DownloadRemoteIndexTaskTest this.server.start(); Connector connector = this.server.getConnectors()[0]; - this.port = connector.getLocalPort(); + this.port = ServerConnector.class.cast( connector ).getLocalPort(); log.info( "start server on port {}", this.port ); nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class ); } |