diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index 315edc10f0a..7b1cb51c029 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -1,9 +1,9 @@ org.eclipse.jetty - jetty-project + examples-parent 9.0.0-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 org.eclipse.jetty diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index 3906d254203..0278b7bb0fc 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -1,9 +1,9 @@ org.eclipse.jetty - jetty-project + examples-parent 9.0.0-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 example-jetty-embedded diff --git a/examples/pom.xml b/examples/pom.xml new file mode 100644 index 00000000000..baf8bef5910 --- /dev/null +++ b/examples/pom.xml @@ -0,0 +1,47 @@ + + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.0.0-SNAPSHOT + ../pom.xml + + org.eclipse.jetty + examples-parent + Jetty Examples :: Parent + pom + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + + + async-rest + embedded + + diff --git a/pom.xml b/pom.xml index cc2525e5da4..8c8ad4b34df 100644 --- a/pom.xml +++ b/pom.xml @@ -392,8 +392,6 @@ jetty-websocket jetty-servlets jetty-util-ajax - test-continuation - test-jetty-webapp jetty-maven-plugin jetty-jspc-maven-plugin jetty-deploy @@ -404,17 +402,15 @@ jetty-jndi jetty-jsp jetty-jaas - jetty-distribution jetty-spring jetty-client jetty-jaspi jetty-osgi - examples/embedded - examples/async-rest jetty-rewrite jetty-nosql + examples tests - + jetty-distribution diff --git a/test-jetty-webapp/src/main/webapp/META-INF/MANIFEST.MF b/test-jetty-webapp/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 49a97a9642f..00000000000 --- a/test-jetty-webapp/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: TestIt -Bundle-SymbolicName: TestIt -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: testit.Activator -Import-Package: javax.servlet;version="2.6", - javax.servlet.http;version="2.6", - javax.servlet.jsp, - javax.servlet.jsp.tagext -Require-Bundle: org.eclipse.jetty.client, - org.eclipse.jetty.continuation, - org.eclipse.jetty.http, - org.eclipse.jetty.io, - org.eclipse.jetty.servlets, - org.eclipse.jetty.util, - org.eclipse.jetty.websocket -Bundle-ClassPath: WEB-INF/classes -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Bundle-ActivationPolicy: lazy -Web-ContextPath: / -Class-Path: - diff --git a/tests/pom.xml b/tests/pom.xml index 5d2065c0eb9..fcba56c0442 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -22,6 +22,7 @@ org.eclipse.jetty jetty-project 9.0.0-SNAPSHOT + ../pom.xml org.eclipse.jetty.tests tests-parent @@ -40,11 +41,10 @@ - + test-webapps test-sessions + test-continuation diff --git a/test-continuation/pom.xml b/tests/test-continuation/pom.xml similarity index 61% rename from test-continuation/pom.xml rename to tests/test-continuation/pom.xml index f32e0385975..54eafaa527c 100644 --- a/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -1,8 +1,27 @@ + + - org.eclipse.jetty - jetty-project + org.eclipse.jetty.tests + tests-parent 9.0.0-SNAPSHOT + ../pom.xml 4.0.0 test-continuation diff --git a/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationBase.java b/tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationBase.java similarity index 100% rename from test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationBase.java rename to tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationBase.java diff --git a/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java b/tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java similarity index 100% rename from test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java rename to tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java diff --git a/test-continuation/src/test/java/org/eclipse/jetty/continuation/FauxContinuationTest.java b/tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/FauxContinuationTest.java similarity index 100% rename from test-continuation/src/test/java/org/eclipse/jetty/continuation/FauxContinuationTest.java rename to tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/FauxContinuationTest.java diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index b247b3fc219..08f9fabc0ef 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -100,11 +100,6 @@ jetty-client ${project.version} - - org.eclipse.jetty - jetty-monitor - ${project.version} - org.eclipse.jetty.toolchain jetty-test-helper diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/DefaultHandlerTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/DefaultHandlerTest.java index a7efbb141e6..60e31fe831a 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/DefaultHandlerTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/DefaultHandlerTest.java @@ -26,7 +26,7 @@ import java.net.URL; import java.net.URLConnection; import java.util.List; -import org.eclipse.jetty.http.HttpSchemes; +import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.test.support.TestableJettyServer; import org.eclipse.jetty.test.support.rawhttp.HttpRequestTester; import org.eclipse.jetty.test.support.rawhttp.HttpResponseTester; @@ -53,7 +53,7 @@ public class DefaultHandlerTest public static void setUpServer() throws Exception { server = new TestableJettyServer(); - server.setScheme(HttpSchemes.HTTP); + server.setScheme(HttpScheme.HTTP.asString()); server.addConfiguration("DefaultHandler.xml"); server.load(); diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/DigestPostTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/DigestPostTest.java index 299e4205532..4b2d38ee1ce 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/DigestPostTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/DigestPostTest.java @@ -29,22 +29,18 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.client.ContentExchange; import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.security.Realm; -import org.eclipse.jetty.client.security.SimpleRealmResolver; -import org.eclipse.jetty.http.HttpMethods; -import org.eclipse.jetty.io.ByteArrayBuffer; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.eclipse.jetty.security.HashLoginService; import org.eclipse.jetty.security.authentication.DigestAuthenticator; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.NetworkConnector; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.DefaultHandler; import org.eclipse.jetty.server.handler.HandlerCollection; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.StringUtil; @@ -80,8 +76,7 @@ public class DigestPostTest try { _server = new Server(); - _server.setConnectors(new Connector[] - { new SelectChannelConnector() }); + _server.setConnectors(new Connector[] { new ServerConnector(_server) }); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SECURITY); context.setContextPath("/test"); @@ -125,13 +120,13 @@ public class DigestPostTest @Test public void testServerDirectlyHTTP10() throws Exception { - Socket socket = new Socket("127.0.0.1",_server.getConnectors()[0].getLocalPort()); + Socket socket = new Socket("127.0.0.1",((NetworkConnector)_server.getConnectors()[0]).getLocalPort()); byte[] bytes = __message.getBytes("UTF-8"); _received=null; socket.getOutputStream().write( ("POST /test/ HTTP/1.0\r\n"+ - "Host: 127.0.0.1:"+_server.getConnectors()[0].getLocalPort()+"\r\n"+ + "Host: 127.0.0.1:"+((NetworkConnector)_server.getConnectors()[0]).getLocalPort()+"\r\n"+ "Content-Length: "+bytes.length+"\r\n"+ "\r\n").getBytes("UTF-8")); socket.getOutputStream().write(bytes); @@ -152,12 +147,12 @@ public class DigestPostTest "\" qop=auth nc="+NC+" cnonce=\""+cnonce+"\""; - socket = new Socket("127.0.0.1",_server.getConnectors()[0].getLocalPort()); + socket = new Socket("127.0.0.1",((NetworkConnector)_server.getConnectors()[0]).getLocalPort()); _received=null; socket.getOutputStream().write( ("POST /test/ HTTP/1.0\r\n"+ - "Host: 127.0.0.1:"+_server.getConnectors()[0].getLocalPort()+"\r\n"+ + "Host: 127.0.0.1:"+((NetworkConnector)_server.getConnectors()[0]).getLocalPort()+"\r\n"+ "Content-Length: "+bytes.length+"\r\n"+ "Authorization: "+digest+"\r\n"+ "\r\n").getBytes("UTF-8")); @@ -173,13 +168,13 @@ public class DigestPostTest @Test public void testServerDirectlyHTTP11() throws Exception { - Socket socket = new Socket("127.0.0.1",_server.getConnectors()[0].getLocalPort()); + Socket socket = new Socket("127.0.0.1",((NetworkConnector)_server.getConnectors()[0]).getLocalPort()); byte[] bytes = __message.getBytes("UTF-8"); _received=null; socket.getOutputStream().write( ("POST /test/ HTTP/1.1\r\n"+ - "Host: 127.0.0.1:"+_server.getConnectors()[0].getLocalPort()+"\r\n"+ + "Host: 127.0.0.1:"+((NetworkConnector)_server.getConnectors()[0]).getLocalPort()+"\r\n"+ "Content-Length: "+bytes.length+"\r\n"+ "\r\n").getBytes("UTF-8")); socket.getOutputStream().write(bytes); @@ -206,7 +201,7 @@ public class DigestPostTest _received=null; socket.getOutputStream().write( ("POST /test/ HTTP/1.0\r\n"+ - "Host: 127.0.0.1:"+_server.getConnectors()[0].getLocalPort()+"\r\n"+ + "Host: 127.0.0.1:"+((NetworkConnector)_server.getConnectors()[0]).getLocalPort()+"\r\n"+ "Content-Length: "+bytes.length+"\r\n"+ "Authorization: "+digest+"\r\n"+ "\r\n").getBytes("UTF-8")); diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JavaMonitorIntegrationTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JavaMonitorIntegrationTest.java deleted file mode 100644 index e08981ec9f5..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JavaMonitorIntegrationTest.java +++ /dev/null @@ -1,171 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.monitor; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.Random; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.http.HttpMethods; -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.monitor.JMXMonitor; -import org.eclipse.jetty.toolchain.test.JettyDistro; -import org.eclipse.jetty.toolchain.test.PropertyFlag; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.util.thread.ExecutorThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; -import org.eclipse.jetty.xml.XmlConfiguration; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/* ------------------------------------------------------------ */ -/** - */ -public class JavaMonitorIntegrationTest -{ - private static final Logger LOG = Log.getLogger(JavaMonitorIntegrationTest.class); - - private static JettyDistro jetty; - - @BeforeClass - public static void initJetty() throws Exception - { - PropertyFlag.assume("JAVAMONITOR"); - - jetty = new JettyDistro(JavaMonitorIntegrationTest.class); - - jetty.delete("contexts/javadoc.xml"); - - jetty.overlayConfig("monitor"); - - jetty.start(); - - JMXMonitor.setServiceUrl(jetty.getJmxUrl()); - } - - @AfterClass - public static void shutdownJetty() throws Exception - { - if (jetty != null) - { - jetty.stop(); - } - } - - @Before - public void setUp() - throws Exception - { - Resource configRes = Resource.newClassPathResource("/org/eclipse/jetty/monitor/java-monitor-integration.xml"); - XmlConfiguration xmlConfig = new XmlConfiguration(configRes.getURL()); - xmlConfig.configure(); - } - - @Test - public void testIntegration() - throws Exception - { - final int threadCount = 100; - final long requestCount = 500; - final String requestUrl = jetty.getBaseUri().resolve("d.txt").toASCIIString(); - final CountDownLatch gate = new CountDownLatch(threadCount); - - ThreadPool worker = new ExecutorThreadPool(threadCount,threadCount,60,TimeUnit.SECONDS); - for (int idx=0; idx < threadCount; idx++) - { - worker.dispatch(new Runnable() { - public void run() - { - runTest(requestUrl, requestCount); - gate.countDown(); - } - }); - Thread.sleep(500); - } - gate.await(); - assertTrue(true); - } - - protected static void runTest(String requestUrl, long count) - { - HttpClient client = new HttpClient(); - client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL); - try - { - client.start(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - - if (client != null) - { - Random rnd = new Random(); - for (long cnt=0; cnt < count; cnt++) - { - try - { - ContentExchange getExchange = new ContentExchange(); - getExchange.setURL(requestUrl); - getExchange.setMethod(HttpMethods.GET); - - client.send(getExchange); - int state = getExchange.waitForDone(); - - String content = ""; - int responseStatus = getExchange.getResponseStatus(); - if (responseStatus == HttpStatus.OK_200) - { - content = getExchange.getResponseContent(); - } - - Thread.sleep(200); - } - catch (InterruptedException ex) - { - break; - } - catch (IOException ex) - { - LOG.debug(ex); - } - } - - try - { - client.stop(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - } - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JmxServiceTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JmxServiceTest.java deleted file mode 100644 index 0c1d8567c1a..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/JmxServiceTest.java +++ /dev/null @@ -1,168 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.monitor; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import javax.management.MBeanServerConnection; - -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.http.HttpMethods; -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.monitor.JMXMonitor; -import org.eclipse.jetty.toolchain.jmx.JmxServiceConnection; -import org.eclipse.jetty.toolchain.test.JettyDistro; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.util.thread.ExecutorThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; -import org.eclipse.jetty.xml.XmlConfiguration; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/* ------------------------------------------------------------ */ -/** - */ -public class JmxServiceTest -{ - private static final Logger LOG = Log.getLogger(JmxServiceTest.class); - - private static JettyDistro jetty; - - @BeforeClass - public static void initJetty() throws Exception - { - jetty = new JettyDistro(JmxServiceTest.class); - - jetty.delete("contexts/javadoc.xml"); - - jetty.overlayConfig("monitor"); - - jetty.start(); - - JMXMonitor.setServiceUrl(jetty.getJmxUrl()); - } - - @AfterClass - public static void shutdownJetty() throws Exception - { - if (jetty != null) - { - jetty.stop(); - } - } - - @Before - public void setUp() - throws Exception - { - Resource configRes = Resource.newClassPathResource("/org/eclipse/jetty/monitor/jetty-monitor-service.xml"); - XmlConfiguration xmlConfig = new XmlConfiguration(configRes.getURL()); - xmlConfig.configure(); - } - - @Test - public void testThreadPoolMXBean() - throws Exception - { - final int threadCount = 100; - final long requestCount = 100; - final String requestUrl = jetty.getBaseUri().resolve("d.txt").toASCIIString(); - final CountDownLatch gate = new CountDownLatch(threadCount); - ThreadPool worker = new ExecutorThreadPool(threadCount,threadCount,60,TimeUnit.SECONDS); - for (int idx=0; idx < threadCount; idx++) - { - worker.dispatch(new Runnable() { - public void run() - { - runTest(requestUrl, requestCount); - gate.countDown(); - } - }); - Thread.sleep(100); - } - gate.await(); - assertTrue(true); - } - - protected static void runTest(String requestUrl, long count) - { - HttpClient client = new HttpClient(); - client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL); - try - { - client.start(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - - if (client != null) - { - for (long cnt=0; cnt < count; cnt++) - { - try - { - ContentExchange getExchange = new ContentExchange(); - getExchange.setURL(requestUrl); - getExchange.setMethod(HttpMethods.GET); - - client.send(getExchange); - int state = getExchange.waitForDone(); - - String content = ""; - int responseStatus = getExchange.getResponseStatus(); - if (responseStatus == HttpStatus.OK_200) - { - content = getExchange.getResponseContent(); - } - - Thread.sleep(100); - } - catch (InterruptedException ex) - { - break; - } - catch (IOException ex) - { - LOG.debug(ex); - } - } - - try - { - client.stop(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - } - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java deleted file mode 100644 index 5f4066bd847..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/ProgramConfigTest.java +++ /dev/null @@ -1,187 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.monitor; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; - -import javax.management.MBeanServerConnection; - -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.http.HttpMethods; -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.monitor.JMXMonitor; -import org.eclipse.jetty.monitor.jmx.ConsoleNotifier; -import org.eclipse.jetty.monitor.jmx.EventNotifier; -import org.eclipse.jetty.monitor.jmx.EventState; -import org.eclipse.jetty.monitor.jmx.EventTrigger; -import org.eclipse.jetty.monitor.jmx.MonitorAction; -import org.eclipse.jetty.monitor.triggers.GreaterThanAttrEventTrigger; -import org.eclipse.jetty.monitor.triggers.LessThanOrEqualToAttrEventTrigger; -import org.eclipse.jetty.monitor.triggers.OrEventTrigger; -import org.eclipse.jetty.toolchain.jmx.JmxServiceConnection; -import org.eclipse.jetty.toolchain.test.JettyDistro; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.thread.ExecutorThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - - -/* ------------------------------------------------------------ */ -/** - */ -public class ProgramConfigTest -{ - private static final Logger LOG = Log.getLogger(ProgramConfigTest.class); - - private static JettyDistro jetty; - - @BeforeClass - public static void initJetty() throws Exception - { - jetty = new JettyDistro(ProgramConfigTest.class); - - jetty.delete("contexts/javadoc.xml"); - - jetty.overlayConfig("monitor"); - - jetty.start(); - - JMXMonitor.setServiceUrl(jetty.getJmxUrl()); - } - - @AfterClass - public static void shutdownJetty() throws Exception - { - if (jetty != null) - { - jetty.stop(); - } - } - - @Test - public void testThreadPoolMXBean() - throws Exception - { - int testRangeLow = 4; - int testRangeHigh = 7; - - LessThanOrEqualToAttrEventTrigger trigger1 = - new LessThanOrEqualToAttrEventTrigger("org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0", "idleThreads", - testRangeLow); - GreaterThanAttrEventTrigger trigger2 = - new GreaterThanAttrEventTrigger("org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0", "idleThreads", - testRangeHigh); - OrEventTrigger trigger = new OrEventTrigger(trigger1, trigger2); - EventNotifier notifier = new ConsoleNotifier("%s"); - final AtomicLong counter = new AtomicLong(); - MonitorAction action = new MonitorAction(trigger, notifier, 500) { - @Override - public void execute(EventTrigger trigger, EventState state, long timestamp) - { - System.out.println(counter.incrementAndGet()); - } - }; - JMXMonitor.addMonitorActions(action); - - final int threadCount = 100; - final long requestCount = 100; - final String requestUrl = jetty.getBaseUri().resolve("d.txt").toASCIIString(); - final CountDownLatch gate = new CountDownLatch(threadCount); - ThreadPool worker = new ExecutorThreadPool(threadCount,threadCount,60,TimeUnit.SECONDS); - for (int idx=0; idx < threadCount; idx++) - { - worker.dispatch(new Runnable() { - public void run() - { - runTest(requestUrl, requestCount); - gate.countDown(); - } - }); - Thread.sleep(100); - } - gate.await(); - JMXMonitor.removeMonitorActions(action); - assertTrue(true); - } - - protected static void runTest(String requestUrl, long count) - { - HttpClient client = new HttpClient(); - client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL); - try - { - client.start(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - - if (client != null) - { - for (long cnt=0; cnt < count; cnt++) - { - try - { - ContentExchange getExchange = new ContentExchange(); - getExchange.setURL(requestUrl); - getExchange.setMethod(HttpMethods.GET); - - client.send(getExchange); - getExchange.waitForDone(); - - String content = ""; - int responseStatus = getExchange.getResponseStatus(); - if (responseStatus == HttpStatus.OK_200) - { - content = getExchange.getResponseContent(); - } - - Thread.sleep(100); - } - catch (InterruptedException ex) - { - break; - } - catch (IOException ex) - { - LOG.debug(ex); - } - } - - try - { - client.stop(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - } - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/XmlConfigTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/XmlConfigTest.java deleted file mode 100644 index 0b92ddba8d9..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/monitor/XmlConfigTest.java +++ /dev/null @@ -1,167 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.monitor; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.Random; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.http.HttpMethods; -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.monitor.JMXMonitor; -import org.eclipse.jetty.toolchain.test.JettyDistro; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.util.thread.ExecutorThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; -import org.eclipse.jetty.xml.XmlConfiguration; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - - -/* ------------------------------------------------------------ */ -/** - */ -public class XmlConfigTest -{ - private static final Logger LOG = Log.getLogger(XmlConfigTest.class); - - private static JettyDistro jetty; - - @BeforeClass - public static void initJetty() throws Exception - { - jetty = new JettyDistro(XmlConfigTest.class); - - jetty.delete("contexts/javadoc.xml"); - - jetty.overlayConfig("monitor"); - - jetty.start(); - - JMXMonitor.setServiceUrl(jetty.getJmxUrl()); - } - - @AfterClass - public static void shutdownJetty() throws Exception - { - if (jetty != null) - { - jetty.stop(); - } - } - - @Before - public void setUp() - throws Exception - { - Resource configRes = Resource.newClassPathResource("/org/eclipse/jetty/monitor/jetty-monitor-test.xml"); - XmlConfiguration xmlConfig = new XmlConfiguration(configRes.getURL()); - xmlConfig.configure(); - } - - @Test - public void testThreadPoolMXBean() - throws Exception - { - final int threadCount = 100; - final long requestCount = 100; - final String requestUrl = jetty.getBaseUri().resolve("d.txt").toASCIIString(); - final CountDownLatch gate = new CountDownLatch(threadCount); - ThreadPool worker = new ExecutorThreadPool(threadCount,threadCount,60,TimeUnit.SECONDS); - for (int idx=0; idx < threadCount; idx++) - { - worker.dispatch(new Runnable() { - public void run() - { - runTest(requestUrl, requestCount); - gate.countDown(); - } - }); - Thread.sleep(100); - } - gate.await(); - assertTrue(true); - } - - protected static void runTest(String requestUrl, long count) - { - HttpClient client = new HttpClient(); - client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL); - try - { - client.start(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - - if (client != null) - { - Random rnd = new Random(); - for (long cnt=0; cnt < count; cnt++) - { - try - { - ContentExchange getExchange = new ContentExchange(); - getExchange.setURL(requestUrl); - getExchange.setMethod(HttpMethods.GET); - - client.send(getExchange); - int state = getExchange.waitForDone(); - - String content = ""; - int responseStatus = getExchange.getResponseStatus(); - if (responseStatus == HttpStatus.OK_200) - { - content = getExchange.getResponseContent(); - } - - Thread.sleep(100); - } - catch (InterruptedException ex) - { - break; - } - catch (IOException ex) - { - LOG.debug(ex); - } - } - - try - { - client.stop(); - } - catch (Exception ex) - { - LOG.debug(ex); - } - } - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpTest.java deleted file mode 100644 index d31bd29b92e..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpTest.java +++ /dev/null @@ -1,49 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.rfcs; - -import org.eclipse.jetty.http.HttpSchemes; -import org.eclipse.jetty.test.support.TestableJettyServer; -import org.eclipse.jetty.test.support.rawhttp.HttpSocket; -import org.eclipse.jetty.test.support.rawhttp.HttpSocketImpl; -import org.junit.BeforeClass; - -/** - * Perform the RFC2616 tests against a server running with the Jetty BIO Connector and listening on standard HTTP. - */ -public class RFC2616BIOHttpTest extends RFC2616BaseTest -{ - @BeforeClass - public static void setupServer() throws Exception - { - TestableJettyServer server = new TestableJettyServer(); - server.setScheme(HttpSchemes.HTTP); - server.addConfiguration("RFC2616Base.xml"); - server.addConfiguration("RFC2616_Redirects.xml"); - server.addConfiguration("RFC2616_Filters.xml"); - server.addConfiguration("BIOHttp.xml"); - setUpServer(server, RFC2616BIOHttpTest.class); - } - - @Override - public HttpSocket getHttpClientSocket() - { - return new HttpSocketImpl(); - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpsTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpsTest.java deleted file mode 100644 index 0688ccd4546..00000000000 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BIOHttpsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.test.rfcs; - -import org.eclipse.jetty.http.HttpSchemes; -import org.eclipse.jetty.test.support.TestableJettyServer; -import org.eclipse.jetty.test.support.rawhttp.HttpSocket; -import org.eclipse.jetty.test.support.rawhttp.HttpsSocketImpl; -import org.junit.BeforeClass; - -/** - * Perform the RFC2616 tests against a server running with the Jetty BIO Connector and listening on HTTPS (HTTP over - * SSL). - */ -public class RFC2616BIOHttpsTest extends RFC2616BaseTest -{ - @BeforeClass - public static void setupServer() throws Exception - { - TestableJettyServer server = new TestableJettyServer(); - server.setScheme(HttpSchemes.HTTPS); - server.addConfiguration("RFC2616Base.xml"); - server.addConfiguration("RFC2616_Redirects.xml"); - server.addConfiguration("RFC2616_Filters.xml"); - server.addConfiguration("BIOHttps.xml"); - setUpServer(server, RFC2616BIOHttpsTest.class); - } - - @Override - public HttpSocket getHttpClientSocket() throws Exception - { - return new HttpsSocketImpl(); - } -} diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpTest.java index 8bbfaea981c..6428814d69d 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpTest.java @@ -18,7 +18,7 @@ package org.eclipse.jetty.test.rfcs; -import org.eclipse.jetty.http.HttpSchemes; +import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.test.support.TestableJettyServer; import org.eclipse.jetty.test.support.rawhttp.HttpSocket; import org.eclipse.jetty.test.support.rawhttp.HttpSocketImpl; @@ -33,7 +33,7 @@ public class RFC2616NIOHttpTest extends RFC2616BaseTest public static void setupServer() throws Exception { TestableJettyServer server = new TestableJettyServer(); - server.setScheme(HttpSchemes.HTTP); + server.setScheme(HttpScheme.HTTP.asString()); server.addConfiguration("RFC2616Base.xml"); server.addConfiguration("RFC2616_Redirects.xml"); server.addConfiguration("RFC2616_Filters.xml"); diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpsTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpsTest.java index 27864c9e3e9..e1189eb953c 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpsTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616NIOHttpsTest.java @@ -18,7 +18,7 @@ package org.eclipse.jetty.test.rfcs; -import org.eclipse.jetty.http.HttpSchemes; +import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.test.support.TestableJettyServer; import org.eclipse.jetty.test.support.rawhttp.HttpSocket; import org.eclipse.jetty.test.support.rawhttp.HttpsSocketImpl; @@ -33,7 +33,7 @@ public class RFC2616NIOHttpsTest extends RFC2616BaseTest public static void setupServer() throws Exception { TestableJettyServer server = new TestableJettyServer(); - server.setScheme(HttpSchemes.HTTPS); + server.setScheme(HttpScheme.HTTPS.asString()); server.addConfiguration("RFC2616Base.xml"); server.addConfiguration("RFC2616_Redirects.xml"); server.addConfiguration("RFC2616_Filters.xml"); diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java index 0824b4bd55c..6218d05ae23 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java @@ -32,8 +32,9 @@ import java.util.List; import java.util.Map; import java.util.Properties; -import org.eclipse.jetty.http.HttpSchemes; +import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.NetworkConnector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.xml.XmlConfiguration; import org.junit.Assert; @@ -49,7 +50,7 @@ public class TestableJettyServer private final Map _properties = new HashMap(); private Server _server; private int _serverPort; - private String _scheme = HttpSchemes.HTTP; + private String _scheme = HttpScheme.HTTP.asString(); /* Popular Directories */ private File baseDir; @@ -154,7 +155,7 @@ public class TestableJettyServer Assert.assertEquals("Server load count",1,serverCount); this._server = foundServer; - this._server.setGracefulShutdown(10); + this._server.setStopTimeout(1000); } @@ -179,7 +180,7 @@ public class TestableJettyServer Connector connectors[] = _server.getConnectors(); for (int i = 0; i < connectors.length; i++) { - Connector connector = connectors[i]; + NetworkConnector connector = (NetworkConnector)connectors[i]; if (connector.getLocalPort() > 0) { this._serverPort = connector.getLocalPort(); diff --git a/tests/test-integration/src/test/resources/monitor/etc/jetty-jmx.xml b/tests/test-integration/src/test/resources/monitor/etc/jetty-jmx.xml deleted file mode 100644 index 8b4f49fa628..00000000000 --- a/tests/test-integration/src/test/resources/monitor/etc/jetty-jmx.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rmi - - 0 - /jndi/rmi://localhost:0/jettyjmx - - - org.eclipse.jetty:name=rmiconnectorserver - - - - diff --git a/tests/test-integration/src/test/resources/monitor/start.ini b/tests/test-integration/src/test/resources/monitor/start.ini deleted file mode 100644 index fe5d7bd5235..00000000000 --- a/tests/test-integration/src/test/resources/monitor/start.ini +++ /dev/null @@ -1,7 +0,0 @@ -OPTIONS=Server,jsp,jmx,resources,websocket,ext -etc/jetty-jmx.xml -etc/jetty.xml -etc/jetty-deploy.xml -etc/jetty-webapps.xml -etc/jetty-contexts.xml -etc/jetty-testrealm.xml diff --git a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/java-monitor-integration.xml b/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/java-monitor-integration.xml deleted file mode 100644 index 757507c6c84..00000000000 --- a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/java-monitor-integration.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - http://194.109.206.51/lemongrass/1.1/push - 57e48e79-f0e6-4909-a6da-e8c1267cbf49 - 8080 - 15000 - - - - - - - diff --git a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-service.xml b/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-service.xml deleted file mode 100644 index bf86f3e0e2e..00000000000 --- a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-service.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jettyjmx - - - - - - - - - - - - - org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0 - - idleThreads - 4 - - - - - org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0 - - idleThreads - 7 - - - - - - - - - %s - - - 500 - - - - - - \ No newline at end of file diff --git a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-test.xml b/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-test.xml deleted file mode 100644 index 49843770c86..00000000000 --- a/tests/test-integration/src/test/resources/org/eclipse/jetty/monitor/jetty-monitor-test.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0 - - idleThreads - 4 - - - - - org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0 - - idleThreads - 7 - - - - - - - - - %s - - - 500 - - - - - - \ No newline at end of file diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index ea792ab117c..0e1e831f29f 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -22,6 +22,7 @@ org.eclipse.jetty.tests tests-parent 9.0.0-SNAPSHOT + ../pom.xml test-webapps-parent Jetty Tests :: WebApps :: Parent @@ -39,6 +40,7 @@ + test-jetty-webapp test-webapp-rfc2616 test-mock-resources test-servlet-spec diff --git a/test-jetty-webapp/jetty-chat.jmx b/tests/test-webapps/test-jetty-webapp/jetty-chat.jmx similarity index 100% rename from test-jetty-webapp/jetty-chat.jmx rename to tests/test-webapps/test-jetty-webapp/jetty-chat.jmx diff --git a/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml similarity index 91% rename from test-jetty-webapp/pom.xml rename to tests/test-webapps/test-jetty-webapp/pom.xml index 76fbd242d77..68802495b59 100644 --- a/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -1,8 +1,27 @@ + + - org.eclipse.jetty - jetty-project + org.eclipse.jetty.tests + test-webapps-parent 9.0.0-SNAPSHOT + ../pom.xml 4.0.0 test-jetty-webapp diff --git a/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml b/tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml similarity index 100% rename from test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml rename to tests/test-webapps/test-jetty-webapp/src/main/assembly/embedded-jetty-web-for-webbundle.xml diff --git a/test-jetty-webapp/src/main/assembly/web-bundle.xml b/tests/test-webapps/test-jetty-webapp/src/main/assembly/web-bundle.xml similarity index 100% rename from test-jetty-webapp/src/main/assembly/web-bundle.xml rename to tests/test-webapps/test-jetty-webapp/src/main/assembly/web-bundle.xml diff --git a/test-jetty-webapp/src/main/config/etc/realm.properties b/tests/test-webapps/test-jetty-webapp/src/main/config/etc/realm.properties similarity index 100% rename from test-jetty-webapp/src/main/config/etc/realm.properties rename to tests/test-webapps/test-jetty-webapp/src/main/config/etc/realm.properties diff --git a/test-jetty-webapp/src/main/config/etc/test-realm.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/etc/test-realm.xml similarity index 100% rename from test-jetty-webapp/src/main/config/etc/test-realm.xml rename to tests/test-webapps/test-jetty-webapp/src/main/config/etc/test-realm.xml diff --git a/test-jetty-webapp/src/main/config/start.d/test-realm.ini b/tests/test-webapps/test-jetty-webapp/src/main/config/start.d/test-realm.ini similarity index 100% rename from test-jetty-webapp/src/main/config/start.d/test-realm.ini rename to tests/test-webapps/test-jetty-webapp/src/main/config/start.d/test-realm.ini diff --git a/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml similarity index 100% rename from test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml rename to tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml diff --git a/test-jetty-webapp/src/main/config/webapps/test.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.xml similarity index 100% rename from test-jetty-webapp/src/main/config/webapps/test.xml rename to tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.xml diff --git a/test-jetty-webapp/src/main/java/com/acme/ChatServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/ChatServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/ChatServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/ChatServlet.java diff --git a/test-jetty-webapp/src/main/java/com/acme/CookieDump.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/CookieDump.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/CookieDump.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/CookieDump.java diff --git a/test-jetty-webapp/src/main/java/com/acme/Counter.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/Counter.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Counter.java diff --git a/test-jetty-webapp/src/main/java/com/acme/Date2Tag.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Date2Tag.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/Date2Tag.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Date2Tag.java diff --git a/test-jetty-webapp/src/main/java/com/acme/DateTag.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/DateTag.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DateTag.java diff --git a/test-jetty-webapp/src/main/java/com/acme/DispatchServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DispatchServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/DispatchServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/DispatchServlet.java diff --git a/test-jetty-webapp/src/main/java/com/acme/Dump.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/Dump.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/Dump.java diff --git a/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/HelloWorld.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java diff --git a/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/LoginServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/LoginServlet.java diff --git a/test-jetty-webapp/src/main/java/com/acme/RegTest.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/RegTest.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RegTest.java diff --git a/test-jetty-webapp/src/main/java/com/acme/RewriteServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RewriteServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/RewriteServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/RewriteServlet.java diff --git a/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SecureModeServlet.java diff --git a/test-jetty-webapp/src/main/java/com/acme/SessionDump.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/SessionDump.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/SessionDump.java diff --git a/test-jetty-webapp/src/main/java/com/acme/TagListener.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TagListener.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/TagListener.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TagListener.java diff --git a/test-jetty-webapp/src/main/java/com/acme/TestFilter.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TestFilter.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/TestFilter.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TestFilter.java diff --git a/test-jetty-webapp/src/main/java/com/acme/TestListener.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TestListener.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/TestListener.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/TestListener.java diff --git a/test-jetty-webapp/src/main/java/com/acme/WebSocketChatServlet.java b/tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/WebSocketChatServlet.java similarity index 100% rename from test-jetty-webapp/src/main/java/com/acme/WebSocketChatServlet.java rename to tests/test-webapps/test-jetty-webapp/src/main/java/com/acme/WebSocketChatServlet.java diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib.tld b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib.tld similarity index 100% rename from test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib.tld rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib.tld diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib2.tld b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib2.tld similarity index 100% rename from test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib2.tld rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/acme-taglib2.tld diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml similarity index 100% rename from test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/tags/panel.tag b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/tags/panel.tag similarity index 100% rename from test-jetty-webapp/src/main/webapp/WEB-INF/tags/panel.tag rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/tags/panel.tag diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from test-jetty-webapp/src/main/webapp/WEB-INF/web.xml rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml diff --git a/test-jetty-webapp/src/main/webapp/auth.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/auth.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/auth.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/auth.html diff --git a/test-jetty-webapp/src/main/webapp/auth/file.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/auth/file.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/auth/file.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/auth/file.txt diff --git a/test-jetty-webapp/src/main/webapp/auth/relax.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/auth/relax.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/auth/relax.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/auth/relax.txt diff --git a/test-jetty-webapp/src/main/webapp/auth2/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/auth2/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/auth2/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/auth2/index.html diff --git a/test-jetty-webapp/src/main/webapp/cgi-bin/hello.sh b/tests/test-webapps/test-jetty-webapp/src/main/webapp/cgi-bin/hello.sh similarity index 100% rename from test-jetty-webapp/src/main/webapp/cgi-bin/hello.sh rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/cgi-bin/hello.sh diff --git a/test-jetty-webapp/src/main/webapp/chat/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/chat/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/chat/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/chat/index.html diff --git a/test-jetty-webapp/src/main/webapp/d.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/d.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/d.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/d.txt diff --git a/test-jetty-webapp/src/main/webapp/da.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/da.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/da.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/da.txt diff --git a/test-jetty-webapp/src/main/webapp/da.txt.gz b/tests/test-webapps/test-jetty-webapp/src/main/webapp/da.txt.gz similarity index 100% rename from test-jetty-webapp/src/main/webapp/da.txt.gz rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/da.txt.gz diff --git a/test-jetty-webapp/src/main/webapp/dat.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/dat.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/dat.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/dat.txt diff --git a/test-jetty-webapp/src/main/webapp/data.txt b/tests/test-webapps/test-jetty-webapp/src/main/webapp/data.txt similarity index 100% rename from test-jetty-webapp/src/main/webapp/data.txt rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/data.txt diff --git a/test-jetty-webapp/src/main/webapp/data.txt.gz b/tests/test-webapps/test-jetty-webapp/src/main/webapp/data.txt.gz similarity index 100% rename from test-jetty-webapp/src/main/webapp/data.txt.gz rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/data.txt.gz diff --git a/test-jetty-webapp/src/main/webapp/error404.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/error404.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/error404.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/error404.html diff --git a/test-jetty-webapp/src/main/webapp/favicon.ico b/tests/test-webapps/test-jetty-webapp/src/main/webapp/favicon.ico similarity index 100% rename from test-jetty-webapp/src/main/webapp/favicon.ico rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/favicon.ico diff --git a/test-jetty-webapp/src/main/webapp/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/index.html diff --git a/test-jetty-webapp/src/main/webapp/jetty_banner.gif b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jetty_banner.gif similarity index 100% rename from test-jetty-webapp/src/main/webapp/jetty_banner.gif rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jetty_banner.gif diff --git a/test-jetty-webapp/src/main/webapp/jsp/bean1.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/bean1.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/bean1.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/bean1.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/bean2.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/bean2.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/bean2.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/bean2.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/dump.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/dump.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/dump.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/dump.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/expr.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/expr.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/expr.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/expr.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/foo/foo.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/foo/foo.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/foo/foo.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/foo/foo.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/index.html diff --git a/test-jetty-webapp/src/main/webapp/jsp/jstl.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/jstl.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/jstl.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/jstl.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/tag.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tag.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/tag.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tag.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/tag2.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tag2.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/tag2.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tag2.jsp diff --git a/test-jetty-webapp/src/main/webapp/jsp/tagfile.jsp b/tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tagfile.jsp similarity index 100% rename from test-jetty-webapp/src/main/webapp/jsp/tagfile.jsp rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/jsp/tagfile.jsp diff --git a/test-jetty-webapp/src/main/webapp/logon.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/logon.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/logon.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/logon.html diff --git a/test-jetty-webapp/src/main/webapp/logonError.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/logonError.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/logonError.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/logonError.html diff --git a/test-jetty-webapp/src/main/webapp/remote.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/remote.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/remote.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/remote.html diff --git a/test-jetty-webapp/src/main/webapp/rewrite/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/rewrite/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/rewrite/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/rewrite/index.html diff --git a/test-jetty-webapp/src/main/webapp/rewrite/info.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/rewrite/info.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/rewrite/info.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/rewrite/info.html diff --git a/test-jetty-webapp/src/main/webapp/ws/index.html b/tests/test-webapps/test-jetty-webapp/src/main/webapp/ws/index.html similarity index 100% rename from test-jetty-webapp/src/main/webapp/ws/index.html rename to tests/test-webapps/test-jetty-webapp/src/main/webapp/ws/index.html diff --git a/test-jetty-webapp/src/test/java/org/eclipse/jetty/DispatchServletTest.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/DispatchServletTest.java similarity index 100% rename from test-jetty-webapp/src/test/java/org/eclipse/jetty/DispatchServletTest.java rename to tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/DispatchServletTest.java diff --git a/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java similarity index 100% rename from test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java rename to tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java