aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorolivier lamy <olamy@apache.org>2017-05-18 13:53:17 +1000
committerolivier lamy <olamy@apache.org>2017-05-18 13:53:17 +1000
commit84a1846854922ad3b7254f94840bf845fcbaaa56 (patch)
treed8bad266cea313ca2f8f3fdf34ee7498d9e499e5 /archiva-modules/archiva-base
parent661634ca2098a56658fcfb994b429d3f5bf609d5 (diff)
parent6f286273991823611cca8733e64626a6ee90ae5f (diff)
downloadarchiva-84a1846854922ad3b7254f94840bf845fcbaaa56.tar.gz
archiva-84a1846854922ad3b7254f94840bf845fcbaaa56.zip
Merge branch 'feature/jetty_9.4'
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml41
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java8
2 files changed, 47 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml
new file mode 100644
index 000000000..282cfa5d9
--- /dev/null
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+<configuration>
+ <appenders>
+ <Console name="console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+ </Console>
+ </appenders>
+ <loggers>
+
+ <logger name="org.springframework" level="error"/>
+
+ <!--
+ <logger name="org.apache.http" level="debug"/>
+ -->
+ <root level="info">
+ <appender-ref ref="console"/>
+ </root>
+ </loggers>
+</configuration>
+
+
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" );