From b56336e2a6a082cee791e97f44dd50f9cc2ac95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Tue, 18 Feb 2014 17:17:47 +0100 Subject: [PATCH 1/9] arquillian - update bom version, use upstream version for jboss-as-arquillian-container-managed --- arquillian/parent/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arquillian/parent/pom.xml b/arquillian/parent/pom.xml index efaab06a7be..6cc6e9715f4 100644 --- a/arquillian/parent/pom.xml +++ b/arquillian/parent/pom.xml @@ -16,7 +16,7 @@ org.jboss.arquillian arquillian-bom - 1.0.0.Final + 1.0.2.Final import pom @@ -107,6 +107,7 @@ + jetty7 @@ -204,7 +205,7 @@ - 7.3.0.Final-redhat-14 + 7.2.0.Final From 91f40756cb69ba4e79f1496564e3d57732063a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Wed, 19 Feb 2014 13:33:43 +0100 Subject: [PATCH 2/9] async-http-server-3.0-test - converted to arquillian testcase --- .../async-http-servlet-3.0-test/README.md | 1 + .../async-http-servlet-3.0-test/pom.xml | 77 ++----------------- .../src/main/resources/roles.properties | 1 - .../src/main/resources/users.properties | 1 - .../jboss/resteasy/test/jboss/SmokeTest.java | 67 +++++++++++----- .../jboss/resteasy/test/smoke/Customer.java | 0 .../org/jboss/resteasy/test/smoke/MyApp.java | 0 .../resteasy/test/smoke/SimpleResource.java | 0 .../src/test/resources/jndi.properties | 3 - .../src/test/resources/log4j.xml | 68 ---------------- .../webapp/WEB-INF => test/resources}/web.xml | 0 11 files changed, 52 insertions(+), 166 deletions(-) create mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/README.md delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/roles.properties delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/users.properties rename async-http-servlet-3.0/async-http-servlet-3.0-test/src/{main => test}/java/org/jboss/resteasy/test/smoke/Customer.java (100%) rename async-http-servlet-3.0/async-http-servlet-3.0-test/src/{main => test}/java/org/jboss/resteasy/test/smoke/MyApp.java (100%) rename async-http-servlet-3.0/async-http-servlet-3.0-test/src/{main => test}/java/org/jboss/resteasy/test/smoke/SimpleResource.java (100%) delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/jndi.properties delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/log4j.xml rename async-http-servlet-3.0/async-http-servlet-3.0-test/src/{main/webapp/WEB-INF => test/resources}/web.xml (100%) diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/README.md b/async-http-servlet-3.0/async-http-servlet-3.0-test/README.md new file mode 100644 index 00000000000..92db2e1eba7 --- /dev/null +++ b/async-http-servlet-3.0/async-http-servlet-3.0-test/README.md @@ -0,0 +1 @@ +see ../../arquillian/README.md \ No newline at end of file diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/pom.xml b/async-http-servlet-3.0/async-http-servlet-3.0-test/pom.xml index f47b6a8c1cb..72a7fe16b1f 100644 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/pom.xml +++ b/async-http-servlet-3.0/async-http-servlet-3.0-test/pom.xml @@ -1,35 +1,21 @@ + 4.0.0 org.jboss.resteasy - resteasy-jaxrs-all + resteasy-arquillian-parent 2.3.7.Final - ../../pom.xml + ../../arquillian/parent/pom.xml - 4.0.0 async-http-servlet-3.0-test - war Async Servlet 3.0 Test - + - - org.jboss.resteasy - resteasy-jaxrs - ${project.version} - org.jboss.resteasy resteasy-jaxb-provider ${project.version} - - - org.jboss.resteasy - async-http-servlet-3.0 - ${project.version} - - - junit - junit + test commons-httpclient @@ -38,57 +24,4 @@ test - - - - org.mortbay.jetty - jetty-maven-plugin - 8.1.4.v20120524 - - 10 - foo - 9999 - - - - start-jetty - pre-integration-test - - run - - - 0 - true - - - - stop-jetty - post-integration-test - - stop - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - false - - - - - - diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/roles.properties b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/roles.properties deleted file mode 100644 index 2b0d374d07d..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/roles.properties +++ /dev/null @@ -1 +0,0 @@ -bill=admin \ No newline at end of file diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/users.properties b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/users.properties deleted file mode 100644 index 67d6a5116cf..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/resources/users.properties +++ /dev/null @@ -1 +0,0 @@ -bill=password diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/jboss/SmokeTest.java b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/jboss/SmokeTest.java index e77f83d32f1..3021bdb4893 100644 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/jboss/SmokeTest.java +++ b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/jboss/SmokeTest.java @@ -1,13 +1,7 @@ package org.jboss.resteasy.test.jboss; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.methods.GetMethod; -import org.jboss.resteasy.test.smoke.Customer; -import org.jboss.resteasy.util.HttpResponseCodes; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.Assert.*; -import javax.xml.bind.JAXBContext; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -15,13 +9,44 @@ import java.io.StringReader; import java.util.zip.GZIPInputStream; +import javax.xml.bind.JAXBContext; + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.methods.GetMethod; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.RunAsClient; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.resteasy.test.smoke.Customer; +import org.jboss.resteasy.test.smoke.MyApp; +import org.jboss.resteasy.test.smoke.SimpleResource; +import org.jboss.resteasy.util.HttpResponseCodes; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.Test; +import org.junit.runner.RunWith; + /** * @author Bill Burke * @version $Revision: 1 $ */ +@RunWith(Arquillian.class) +@RunAsClient public class SmokeTest { + private static final String NAME = "async-http"; + + @Deployment + public static WebArchive createDeployment() + { + return ShrinkWrap.create(WebArchive.class, NAME + ".war") + .addClass(Customer.class) + .addClass(MyApp.class) + .addClasses(SimpleResource.class) + .addAsWebInfResource("web.xml") + ; + } + @Test public void testFailure() throws Exception @@ -29,12 +54,12 @@ public void testFailure() throws Exception HttpClient client = new HttpClient(); { - GetMethod method = new GetMethod("http://localhost:8080/failure"); + GetMethod method = new GetMethod("http://localhost:8080/" + NAME + "/failure"); long start = System.currentTimeMillis(); int status = client.executeMethod(method); long end = System.currentTimeMillis() - start; - Assert.assertTrue(end < 1000); - Assert.assertEquals(403, status); + assertTrue(end < 1000); + assertEquals(403, status); method.releaseConnection(); } } @@ -44,27 +69,27 @@ public void testNoDefaultsResource() throws Exception HttpClient client = new HttpClient(); { - GetMethod method = new GetMethod("http://localhost:8080/basic"); + GetMethod method = new GetMethod("http://localhost:8080/" + NAME + "/basic"); int status = client.executeMethod(method); - Assert.assertEquals(HttpResponseCodes.SC_OK, status); - Assert.assertEquals("basic", method.getResponseBodyAsString()); + assertEquals(HttpResponseCodes.SC_OK, status); + assertEquals("basic", method.getResponseBodyAsString()); method.releaseConnection(); } { // I'm testing unknown content-length here - GetMethod method = new GetMethod("http://localhost:8080/xml"); + GetMethod method = new GetMethod("http://localhost:8080/" + NAME + "/xml"); int status = client.executeMethod(method); - Assert.assertEquals(HttpResponseCodes.SC_OK, status); + assertEquals(HttpResponseCodes.SC_OK, status); String result = method.getResponseBodyAsString(); JAXBContext ctx = JAXBContext.newInstance(Customer.class); Customer cust = (Customer) ctx.createUnmarshaller().unmarshal(new StringReader(result)); - Assert.assertEquals("Bill Burke", cust.getName()); + assertEquals("Bill Burke", cust.getName()); method.releaseConnection(); } } - public String readString(InputStream in) throws IOException + private String readString(InputStream in) throws IOException { char[] buffer = new char[1024]; StringBuilder builder = new StringBuilder(); @@ -89,17 +114,17 @@ public void testGzip() throws Exception { HttpClient client = new HttpClient(); { - GetMethod get = new GetMethod("http://localhost:8080/gzip"); + GetMethod get = new GetMethod("http://localhost:8080/" + NAME + "/gzip"); get.addRequestHeader("Accept-Encoding", "gzip, deflate"); int status = client.executeMethod(get); - Assert.assertEquals(200, status); - Assert.assertEquals("gzip", get.getResponseHeader("Content-Encoding").getValue()); + assertEquals(200, status); + assertEquals("gzip", get.getResponseHeader("Content-Encoding").getValue()); GZIPInputStream gzip = new GZIPInputStream(get.getResponseBodyAsStream()); String response = readString(gzip); // test that it is actually zipped - Assert.assertEquals(response, "HELLO WORLD"); + assertEquals(response, "HELLO WORLD"); } } diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/Customer.java b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/Customer.java similarity index 100% rename from async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/Customer.java rename to async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/Customer.java diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/MyApp.java b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/MyApp.java similarity index 100% rename from async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/MyApp.java rename to async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/MyApp.java diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/SimpleResource.java b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/SimpleResource.java similarity index 100% rename from async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/java/org/jboss/resteasy/test/smoke/SimpleResource.java rename to async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/java/org/jboss/resteasy/test/smoke/SimpleResource.java diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/jndi.properties b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/jndi.properties deleted file mode 100644 index a3aa40712c9..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/jndi.properties +++ /dev/null @@ -1,3 +0,0 @@ -java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -java.naming.provider.url=jnp://localhost:1099 \ No newline at end of file diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/log4j.xml b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/log4j.xml deleted file mode 100644 index 64757a6be01..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/log4j.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/webapp/WEB-INF/web.xml b/async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/web.xml similarity index 100% rename from async-http-servlet-3.0/async-http-servlet-3.0-test/src/main/webapp/WEB-INF/web.xml rename to async-http-servlet-3.0/async-http-servlet-3.0-test/src/test/resources/web.xml From 52e040eea62e1f02fb61217a1de8cafd799a8e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Fri, 21 Feb 2014 09:26:41 +0100 Subject: [PATCH 3/9] added arquillian extension arquillian-deployment-scenario-provider allows to create deployment during test in arquiallian testcases running on client side --- .../pom.xml | 40 +++++++++++++++++++ .../extension/DeploymentScenarioProvider.java | 28 +++++++++++++ .../DeploymentScenarioProviderExtension.java | 16 ++++++++ ...boss.arquillian.core.spi.LoadableExtension | 1 + 4 files changed, 85 insertions(+) create mode 100644 arquillian-deployment-scenario-provider/pom.xml create mode 100644 arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProvider.java create mode 100644 arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProviderExtension.java create mode 100644 arquillian-deployment-scenario-provider/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension diff --git a/arquillian-deployment-scenario-provider/pom.xml b/arquillian-deployment-scenario-provider/pom.xml new file mode 100644 index 00000000000..f215be5a140 --- /dev/null +++ b/arquillian-deployment-scenario-provider/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + org.jboss.resteasy + arquillian-deployment-scenario-provider + 1.0.0.Final + + + UTF-8 + UTF-8 + + 1.6 + 1.6 + + + + + + org.jboss.arquillian + arquillian-bom + 1.0.2.Final + import + pom + + + + + + + + org.jboss.arquillian.container + arquillian-container-spi + + + org.jboss.arquillian.test + arquillian-test-spi + + + + diff --git a/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProvider.java b/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProvider.java new file mode 100644 index 00000000000..eeeaa2166c7 --- /dev/null +++ b/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProvider.java @@ -0,0 +1,28 @@ +package org.jboss.resteasy.arquillian.extension; + +import java.lang.annotation.Annotation; + +import org.jboss.arquillian.container.spi.client.deployment.DeploymentScenario; +import org.jboss.arquillian.core.api.Instance; +import org.jboss.arquillian.core.api.annotation.Inject; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; + +public class DeploymentScenarioProvider implements ResourceProvider +{ + @Inject + private Instance deploymentScenario; + + @Override + public Object lookup(ArquillianResource resource, Annotation... qualifiers) + { + return deploymentScenario.get(); + } + + @Override + public boolean canProvide(Class type) + { + return DeploymentScenario.class.isAssignableFrom(type); + } + + } \ No newline at end of file diff --git a/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProviderExtension.java b/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProviderExtension.java new file mode 100644 index 00000000000..764d614e25a --- /dev/null +++ b/arquillian-deployment-scenario-provider/src/main/java/org/jboss/resteasy/arquillian/extension/DeploymentScenarioProviderExtension.java @@ -0,0 +1,16 @@ +package org.jboss.resteasy.arquillian.extension; + +import org.jboss.arquillian.core.spi.LoadableExtension; +import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; + +public class DeploymentScenarioProviderExtension implements LoadableExtension { + + @Override + public void register(ExtensionBuilder builder) { + builder.service(ResourceProvider.class, DeploymentScenarioProvider.class); + } + +} + + + diff --git a/arquillian-deployment-scenario-provider/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/arquillian-deployment-scenario-provider/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension new file mode 100644 index 00000000000..cbcebf6b2de --- /dev/null +++ b/arquillian-deployment-scenario-provider/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -0,0 +1 @@ +org.jboss.resteasy.arquillian.extension.DeploymentScenarioProviderExtension From 920b84a3e763902852104f5bcf5ae33c8e4efcfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Fri, 21 Feb 2014 14:28:09 +0100 Subject: [PATCH 4/9] added profile to optionally exclude clover --- pom.xml | 29 ++++++++++++++++++++--------- resteasy-jaxrs-test/pom.xml | 10 ---------- resteasy-jaxrs/pom.xml | 10 ---------- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 62ade3f65f3..fdc85558f36 100644 --- a/pom.xml +++ b/pom.xml @@ -395,7 +395,6 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.8 128m 1024m @@ -408,7 +407,6 @@ org.apache.maven.plugins maven-install-plugin - 2.3.1 true @@ -416,7 +414,6 @@ org.apache.maven.plugins maven-source-plugin - 2.1.2 verify @@ -429,14 +426,28 @@ org.apache.maven.plugins maven-deploy-plugin - 2.5 - - - com.atlassian.maven.plugins - maven-clover2-plugin - 3.1.6 + + + + clover + + + !disable-clover + + + + + + com.atlassian.maven.plugins + maven-clover2-plugin + 3.1.6 + + + + + diff --git a/resteasy-jaxrs-test/pom.xml b/resteasy-jaxrs-test/pom.xml index af8573ad3e7..ce0a2f77c2a 100644 --- a/resteasy-jaxrs-test/pom.xml +++ b/resteasy-jaxrs-test/pom.xml @@ -22,16 +22,6 @@ - - - - com.atlassian.maven.plugins - maven-clover2-plugin - 3.1.6 - - - - diff --git a/resteasy-jaxrs/pom.xml b/resteasy-jaxrs/pom.xml index 31d80ead944..2f33673d1ad 100644 --- a/resteasy-jaxrs/pom.xml +++ b/resteasy-jaxrs/pom.xml @@ -89,14 +89,4 @@ - - - - com.atlassian.maven.plugins - maven-clover2-plugin - 3.1.6 - - - - From 43fb1db9e1b86e112781822bb639bb6ba60e4432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Fri, 21 Feb 2014 15:28:07 +0100 Subject: [PATCH 5/9] added test for WFLY-2642 --- arquillian/parent/pom.xml | 8 + pom.xml | 13 ++ resteasy-spring-jboss/README.md | 14 ++ resteasy-spring-jboss/pom.xml | 185 ++++++++++++++++++ .../AddSpringResteasyAsResourceRootIT.java | 185 ++++++++++++++++++ .../spring/jboss/TestApplication.java | 25 +++ .../resteasy/spring/jboss/TestResource.java | 37 ++++ .../src/test/resources/applicationContext.xml | 11 ++ .../applicationContext.xml | 9 + .../mvc-dispatcher-servlet.xml | 9 + .../resources/mvc-dispatcher-servlet/web.xml | 30 +++ .../test/resources/web-no-mvc-no-listener.xml | 26 +++ .../src/test/resources/web.xml | 27 +++ 13 files changed, 579 insertions(+) create mode 100644 resteasy-spring-jboss/README.md create mode 100644 resteasy-spring-jboss/pom.xml create mode 100644 resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java create mode 100644 resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestApplication.java create mode 100644 resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestResource.java create mode 100644 resteasy-spring-jboss/src/test/resources/applicationContext.xml create mode 100644 resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/applicationContext.xml create mode 100644 resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml create mode 100644 resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/web.xml create mode 100644 resteasy-spring-jboss/src/test/resources/web-no-mvc-no-listener.xml create mode 100644 resteasy-spring-jboss/src/test/resources/web.xml diff --git a/arquillian/parent/pom.xml b/arquillian/parent/pom.xml index 6cc6e9715f4..ed71c2aaaa9 100644 --- a/arquillian/parent/pom.xml +++ b/arquillian/parent/pom.xml @@ -73,6 +73,14 @@ commons-logging test + + org.jboss.resteasy + arquillian-deployment-scenario-provider + 1.0.0.Final + test + + + diff --git a/pom.xml b/pom.xml index fdc85558f36..eee979055d5 100644 --- a/pom.xml +++ b/pom.xml @@ -118,6 +118,7 @@ jboss-modules arquillian + arquillian-deployment-scenario-provider @@ -449,5 +450,17 @@ + + + resteasy-spring-jboss + + + resteasy-spring-jboss + + + + resteasy-spring-jboss + + diff --git a/resteasy-spring-jboss/README.md b/resteasy-spring-jboss/README.md new file mode 100644 index 00000000000..ca1a11a4c0b --- /dev/null +++ b/resteasy-spring-jboss/README.md @@ -0,0 +1,14 @@ +Test automatic adding of resteasy-spring dependency as resource root by server (EAP 6.3 / Wildfly) + +To run test from current module directory + + mvn clean verify -Djboss.home=JBOSS_HOME + #eg. mvn clean verify -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR0/build/jboss-eap-6.3 + +Notes: +To install run arquillian-deployment-scenario-provider dependency into local maven repository + mvn install -pl :arquillian-deployment-scenario-provider from top level directory + +To run test from top level directory + mvn clean verify -pl :resteasy-spring-jboss -Dresteasy-spring-jboss -Djboss.home=JBOSS_HOME + #eg. mvn clean verify -pl :resteasy-spring-jboss -Dresteasy-spring-jboss -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR0/build/jboss-eap-6.3 diff --git a/resteasy-spring-jboss/pom.xml b/resteasy-spring-jboss/pom.xml new file mode 100644 index 00000000000..c9cf061c740 --- /dev/null +++ b/resteasy-spring-jboss/pom.xml @@ -0,0 +1,185 @@ + + + 4.0.0 + org.jboss.resteasy + resteasy-spring-jboss + 1.0.0.Final + + + UTF-8 + UTF-8 + + 1.6 + 1.6 + + + 2.2.2 + 3.1 + 4.8.2 + 1.6.11 + 1.0.2.Final + 7.2.0.Final + 2.3.7.Final-redhat-2 + 2.1.0-alpha-1 + 3.2.5.RELEASE + 2.15 + + + + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-bom + ${version.org.jboss.shrinkwrap.resolver} + import + pom + + + org.jboss.arquillian + arquillian-bom + ${version.org.jboss.arquillian} + import + pom + + + + + + + + org.jboss.arquillian.protocol + arquillian-protocol-servlet + test + + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-bom + ${version.org.jboss.shrinkwrap.resolver} + import + pom + + + + junit + junit + ${version.junit} + test + + + + commons-httpclient + commons-httpclient + ${version.commons-httpclient} + test + + + + + org.jboss.resteasy + arquillian-deployment-scenario-provider + 1.0.0.Final + test + + + + + org.jboss.as + jboss-as-arquillian-container-managed + ${version.org.jboss.as.jboss-as-arquillian-container-managed} + test + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${version.maven-failsafe-plugin} + + true + + + + surefire-it + integration-test + + integration-test + + + false + + + jboss.home + ${jboss.home} + + + + + + + + + + + dependencies-in-deployment + + + !as-modules + + + + + org.jboss.resteasy + resteasy-spring + ${version.org.jboss.resteasy} + provided + + + org.springframework + spring-context + ${version.org.springframework} + + + org.springframework + spring-web + ${version.org.springframework} + + + + + cglib + cglib-nodep + ${version.cglib} + + + + org.springframework + spring-aop + ${version.org.springframework} + + + + + org.aspectj + aspectjweaver + ${version.org.aspectj} + + + + + diff --git a/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java new file mode 100644 index 00000000000..9d4dfc46d45 --- /dev/null +++ b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java @@ -0,0 +1,185 @@ +package org.jboss.resteasy.spring.jboss; + +import static org.jboss.resteasy.spring.jboss.TestResource.*; +import static org.jboss.resteasy.util.HttpResponseCodes.*; +import static org.junit.Assert.*; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpException; +import org.apache.commons.httpclient.HttpMethod; +import org.apache.commons.httpclient.methods.GetMethod; +import org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription; +import org.jboss.arquillian.container.spi.client.deployment.DeploymentScenario; +import org.jboss.arquillian.container.test.api.Deployer; +import org.jboss.arquillian.container.test.api.RunAsClient; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.jboss.resteasy.plugins.spring.SpringContextLoaderListener; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.exporter.ZipExporter; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(Arquillian.class) +@RunAsClient +public class AddSpringResteasyAsResourceRootIT { + private static final String DEPLOYMENT = "resteasy-spring-jboss-test"; + + @ArquillianResource + private Deployer deployer; + + @ArquillianResource + private DeploymentScenario deploymentScenario; + + private HttpClient client; + + private String springVersion; + private String deploymentName; + + @Before + public void before() throws Exception { + springVersion = getSpringVersion(); + client = new HttpClient(); + } + + @After + public void after() { + deployer.undeploy(deploymentName); + + } + + + @Test + public void testDeploymentWithSpringMvcDispatcherAddsResourceRoot() throws Exception { + deploymentName = DEPLOYMENT + "1"; + DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithSpringMvcDispatcher(deploymentName)); + deploymentDescription.shouldBeManaged(false); + + deploymentScenario.addDeployment(deploymentDescription); + deployer.deploy(deploymentDescription.getName()); + + assertResponse(deploymentName); + assertTrue(isResteasySpringClassIsLoaded(deploymentName)); + } + + // FIXME currently fails because of bug in implementation which is looking for org.resteasy.plugins.spring.SpringContextLoaderListener in web.xml, but it should be org.jboss.resteasy.plugins.spring.SpringContextLoaderListener + // https://issues.jboss.org/browse/EAP6-46 + @Test + public void testDeploymentWithSpringContextLoaderListenerAddsResourceRoot() throws Exception { + deploymentName = DEPLOYMENT + "2"; + DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithSpringContextLoaderListener(deploymentName)); + deploymentDescription.shouldBeManaged(false); + + deploymentScenario.addDeployment(deploymentDescription); + deployer.deploy(deploymentDescription.getName()); + + assertResponse(deploymentName); + assertTrue(isResteasySpringClassIsLoaded(deploymentName)); + } + + @Test + public void testDeploymentWithoutSpringMvcDispatcherOrListenerDoesNotAddResourceRoot() throws Exception { + deploymentName = DEPLOYMENT + "3"; + DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithoutSpringMvcDispatcherOrListener(deploymentName)); + deploymentDescription.shouldBeManaged(false); + + deploymentScenario.addDeployment(deploymentDescription); + deployer.deploy(deploymentDescription.getName()); + + assertResponse(deploymentName); + assertFalse(isResteasySpringClassIsLoaded(deploymentName)); + } + + + + private Archive createDeploymentWithoutSpringMvcDispatcherOrListener(String name) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") + .addClass(TestResource.class) + .addClass(TestApplication.class) + .addAsLibraries(resolveSpringDependencies()) + .addAsWebInfResource("web-no-mvc-no-listener.xml", "web.xml") + .addAsWebInfResource("applicationContext.xml"); + archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); + return archive; + } + + private boolean isResteasySpringClassIsLoaded(String deploymentName) throws IOException, HttpException { + + String CONTEXT_URL = "http://localhost:8080/" + deploymentName; + + String className = SpringContextLoaderListener.class.getName(); + HttpMethod httpMethod = new GetMethod(CONTEXT_URL + "/" + TestResource.LOAD_CLASS_PATH + "?" + CLASSNAME_PARAM + "=" + className); + try { + return (SC_OK == client.executeMethod(httpMethod)) + && (className.equals(httpMethod.getResponseBodyAsString())); + } finally { + httpMethod.releaseConnection(); + } + } + + private void assertResponse(String deploymentName) throws IOException, HttpException { + + String CONTEXT_URL = "http://localhost:8080/" + deploymentName; + + HttpMethod httpMethod = new GetMethod(CONTEXT_URL + "/" + TEST_PATH); + + assertEquals(SC_OK, client.executeMethod(httpMethod)); + assertEquals(TEST_RESPONSE, httpMethod.getResponseBodyAsString()); + httpMethod.releaseConnection(); + } + + private WebArchive createDeploymentWithSpringMvcDispatcher(String name) { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") + .addClass(TestResource.class) + .addAsLibraries(resolveSpringDependencies()) + .addAsWebInfResource("mvc-dispatcher-servlet/web.xml") + .addAsWebInfResource("mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml") + .addAsWebInfResource("mvc-dispatcher-servlet/applicationContext.xml"); + archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); + return archive; + } + + private Archive createDeploymentWithSpringContextLoaderListener(String name) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") + .addClass(TestResource.class) + .addAsLibraries(resolveSpringDependencies()) + .addAsWebInfResource("web.xml") + .addAsWebInfResource("applicationContext.xml"); + archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); + return archive; + } + + private File[] resolveSpringDependencies() { + List runtimeDependencies = new ArrayList(); + runtimeDependencies.addAll(Arrays.asList(Maven.resolver().resolve("org.springframework:spring-core:" + springVersion).withTransitivity().asFile())); + runtimeDependencies.addAll(Arrays.asList(Maven.resolver().resolve("org.springframework:spring-web:" + springVersion).withTransitivity().asFile())); + runtimeDependencies.addAll(Arrays.asList(Maven.resolver().resolve("org.springframework:spring-webmvc:" + springVersion).withTransitivity().asFile())); + File[] dependencies = runtimeDependencies.toArray(new File []{}); + return dependencies; + } + + + + private String getSpringVersion() { + return readSystemProperty("version.org.springframework", "3.2.5.RELEASE"); + } + + private String readSystemProperty(String name, String defaultValue) { + String value = System.getProperty(name); + return (value == null) ? defaultValue : value; + } + + +} diff --git a/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestApplication.java b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestApplication.java new file mode 100644 index 00000000000..d3ebe0ba96a --- /dev/null +++ b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestApplication.java @@ -0,0 +1,25 @@ +package org.jboss.resteasy.spring.jboss; + +import java.util.HashSet; +import java.util.Set; + +import javax.ws.rs.core.Application; +import javax.ws.rs.ext.Provider; + +/** + * + * @author Ron Sigal + * @version $Revision: 1.1 $ + * + * Copyright Aug 15, 2012 + */ +@Provider +public class TestApplication extends Application +{ + public Set> getClasses() + { + HashSet> classes = new HashSet>(); + classes.add(TestResource.class); + return classes; + } +} diff --git a/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestResource.java b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestResource.java new file mode 100644 index 00000000000..c08148871f7 --- /dev/null +++ b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/TestResource.java @@ -0,0 +1,37 @@ +package org.jboss.resteasy.spring.jboss; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +@Path("/") +public class TestResource { + + public static final String TEST_PATH = "test"; + + public static final String TEST_RESPONSE = "test passed"; + + public static final String LOAD_CLASS_PATH = "loadClass"; + + public static final String CLASSNAME_PARAM = "className"; + + @GET + @Path(TEST_PATH) + @Produces("text/plain") + public String getBasic() { + return TEST_RESPONSE; + } + + @GET + @Path(TestResource.LOAD_CLASS_PATH) + @Produces("text/plain") + public String loadClass(@QueryParam(CLASSNAME_PARAM) String className) { + try { + return getClass().getClassLoader().loadClass(className).getName(); + } catch (ClassNotFoundException e) { + return null; + } + } + +} \ No newline at end of file diff --git a/resteasy-spring-jboss/src/test/resources/applicationContext.xml b/resteasy-spring-jboss/src/test/resources/applicationContext.xml new file mode 100644 index 00000000000..f9cc203b3c7 --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/applicationContext.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/applicationContext.xml b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/applicationContext.xml new file mode 100644 index 00000000000..838f29687d8 --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/applicationContext.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml new file mode 100644 index 00000000000..ad38e879aaf --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/web.xml b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/web.xml new file mode 100644 index 00000000000..a368bb45082 --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/mvc-dispatcher-servlet/web.xml @@ -0,0 +1,30 @@ + + + + Archetype Created Web Application + + + + org.springframework.web.context.ContextLoaderListener + + + + mvc-dispatcher + org.springframework.web.servlet.DispatcherServlet + 1 + + + + mvc-dispatcher + / + + + + diff --git a/resteasy-spring-jboss/src/test/resources/web-no-mvc-no-listener.xml b/resteasy-spring-jboss/src/test/resources/web-no-mvc-no-listener.xml new file mode 100644 index 00000000000..3213545d103 --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/web-no-mvc-no-listener.xml @@ -0,0 +1,26 @@ + + + + Archetype Created Web Application + + + + Resteasy + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + + javax.ws.rs.Application + org.jboss.resteasy.spring.jboss.TestApplication + + + + + + Resteasy + /* + + + + diff --git a/resteasy-spring-jboss/src/test/resources/web.xml b/resteasy-spring-jboss/src/test/resources/web.xml new file mode 100644 index 00000000000..32971c38cc5 --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/web.xml @@ -0,0 +1,27 @@ + + + + Archetype Created Web Application + + + org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap + + + + org.jboss.resteasy.plugins.spring.SpringContextLoaderListener + + + + Resteasy + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + + + Resteasy + /* + + + + From 955160bca8bb8713b4533efec63982e3c0754d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Mon, 10 Mar 2014 17:08:09 +0100 Subject: [PATCH 6/9] added test for WFLY-2642 case when spring installed as server module --- arquillian/README.md | 11 + resteasy-spring-jboss/README.md | 45 ++- resteasy-spring-jboss/pom.xml | 288 +++++++++++++++++- .../AddSpringResteasyAsResourceRootIT.java | 64 +++- .../src/test/modules/spring/3.2.x/module.xml | 75 +++++ .../resources/jboss-deployment-structure.xml | 7 + 6 files changed, 464 insertions(+), 26 deletions(-) create mode 100644 resteasy-spring-jboss/src/test/modules/spring/3.2.x/module.xml create mode 100644 resteasy-spring-jboss/src/test/resources/jboss-deployment-structure.xml diff --git a/arquillian/README.md b/arquillian/README.md index 331a660a167..2c365e5850b 100644 --- a/arquillian/README.md +++ b/arquillian/README.md @@ -28,6 +28,17 @@ To run multiple tests at once append list of artifact ids of modules to test -pl eg. mvn verify -fn -Djboss730 -Djboss.home=/home/development/JBEAP-6.2.0.GA/jboss-eap-6.2 -pl :RESTEASY-736,:RESTEASY-752,:RESTEASY-760 +Debugging JBoss AS in IDE +run test with following VM arguments to be able to start remote debugging on port 8787: + + -Djboss.home=YOUR_PATH_TO_JBOSS + -Djboss.options="-Xmx512m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" + +Another handy options: + + -Djboss.socket.binding.port-offset=1000 + -DallowConnectingToRunningServer=true + Known failures RESTEASY-736 fails for Jboss AS 7.1, EAP 6.0, 6.1.x, 6.2.x RESTEASY-752 fails for Jboss AS 7.1, EAP 6.0 diff --git a/resteasy-spring-jboss/README.md b/resteasy-spring-jboss/README.md index ca1a11a4c0b..b4362a23fc1 100644 --- a/resteasy-spring-jboss/README.md +++ b/resteasy-spring-jboss/README.md @@ -1,14 +1,49 @@ Test automatic adding of resteasy-spring dependency as resource root by server (EAP 6.3 / Wildfly) -To run test from current module directory +1. Deployment contains spring dependencies + +a) to run test from current module directory (server already installed) mvn clean verify -Djboss.home=JBOSS_HOME - #eg. mvn clean verify -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR0/build/jboss-eap-6.3 + #eg. mvn clean verify -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR1/build/jboss-eap-6.3 + + #run with different version of resteasy-spring and spring + mvn clean verify -Djboss.home=JBOSS_HOME -Dversion.org.jboss.resteasy=2.3.8.Final-redhat-1 -Dversion.org.springframework=4.0.0.RELEASE + +2. Spring is installed as server module, deployment does not contain spring dependencies + +a) To run test from current module directory when server with spring module is already installed + + mvn clean verify -Djboss.home=JBOSS_HOME -Dspring-in-module + #eg. mvn clean verify -Dspring-in-module -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR0/build/jboss-eap-6.3 + +b) To install spring module and run test from current module directory when server is already installed + + mvn verify -Dinstall-as-module-spring-3.2.x -Dspring-in-module -Djboss.home=JBOSS_HOME + + Note: this will change server installation, it will install spring module + +c) To download server, unpack, install spring module and run test from current module directory + mvn clean verify -Dinstall-as-module-spring-3.2.x -Dspring-in-module -Dinstall-jboss + Notes: -To install run arquillian-deployment-scenario-provider dependency into local maven repository - mvn install -pl :arquillian-deployment-scenario-provider from top level directory -To run test from top level directory +alternative to specifying dependency on spring module in MANIFEST.MF + + definition of property -Duse-jboss-deployment-structure causes to add to deployment as WEB-INF resource file jboss-deployment-structure + +Example of VM arguments for debugging in Eclipse + + -DallowConnectingToRunningServer=true -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR2/build/jboss-eap-6.3 -Dspring-in-module -Djboss.options="-Xmx512m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" -Duse-jboss-deployment-structure + +When maven fails because of missing dependency arquillian-deployment-scenario-provider, install it into local maven repository by running following command in top level directory + + mvn install -pl :arquillian-deployment-scenario-provider + +To run test from top level directory append -pl :resteasy-spring-jboss + mvn clean verify -pl :resteasy-spring-jboss -Dresteasy-spring-jboss -Djboss.home=JBOSS_HOME #eg. mvn clean verify -pl :resteasy-spring-jboss -Dresteasy-spring-jboss -Djboss.home=/home/development/jbossqe/JBEAP-6.3.0.DR0/build/jboss-eap-6.3 + +Downloaded server is unpacked into target folder diff --git a/resteasy-spring-jboss/pom.xml b/resteasy-spring-jboss/pom.xml index c9cf061c740..45a9c1a7cce 100644 --- a/resteasy-spring-jboss/pom.xml +++ b/resteasy-spring-jboss/pom.xml @@ -23,6 +23,9 @@ 2.1.0-alpha-1 3.2.5.RELEASE 2.15 + 1.7 + + @@ -59,9 +62,8 @@ org.jboss.shrinkwrap.resolver - shrinkwrap-resolver-bom - ${version.org.jboss.shrinkwrap.resolver} - import + shrinkwrap-resolver-depchain + test pom @@ -136,10 +138,56 @@ - dependencies-in-deployment + spring-in-deployment + + + !spring-in-module + + + + + org.jboss.resteasy + resteasy-spring + ${version.org.jboss.resteasy} + provided + + + org.springframework + spring-context + ${version.org.springframework} + + + org.springframework + spring-web + ${version.org.springframework} + + + + + cglib + cglib-nodep + ${version.cglib} + + + + org.springframework + spring-aop + ${version.org.springframework} + + + + + org.aspectj + aspectjweaver + ${version.org.aspectj} + + + + + spring-in-module - !as-modules + spring-in-module @@ -153,11 +201,13 @@ org.springframework spring-context ${version.org.springframework} + provided org.springframework spring-web ${version.org.springframework} + provided @@ -165,12 +215,14 @@ cglib cglib-nodep ${version.cglib} + provided org.springframework spring-aop ${version.org.springframework} + provided @@ -178,8 +230,234 @@ org.aspectj aspectjweaver ${version.org.aspectj} + provided + + install-jboss + + + install-jboss + + + + + org.jboss.as + jboss-as-dist + 7.3.0.Final-redhat-14 + + 6.3 + + target/jboss-eap-${as.version.major-minor} + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${version.maven-antrun-plugin} + + + install-as + validate + + + ---------------------------------------------- + Install AS ${as.distribution.groupId}:${as.distribution.artifactId}:${as.distribution.version} into ${jboss.home} + ---------------------------------------------- + + + + run + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + install-as + prepare-package + + unpack + + + + + ${as.distribution.groupId} + ${as.distribution.artifactId} + ${as.distribution.version} + zip + ${as.overwrite-existing} + ${project.build.directory} + + + false + + + + + + + + + install-as-module-spring-3.2.x + + + install-as-module-spring-3.2.x + + + + + 3.2.x + main + ${jboss.home}/modules/system/add-ons/spring/org/springframework/spring/${module.spring.slot} + + 1.7.3 + 1.0 + 3.2.5.RELEASE + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${version.maven-antrun-plugin} + + + install-as-module-spring-3.2.x-info + pre-integration-test + + + ---------------------------------------------- + Install AS module spring (slot {module.spring.slot}) into ${jboss.home} + ---------------------------------------------- + + + + run + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + + install-as-module-spring-3.2.x-resources + pre-integration-test + + copy-resources + + + ${module.spring.path} + + + src/test/modules/spring/${module.spring.version} + true + + + true + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + install-as-module-spring-3.2.x-dependencies + pre-integration-test + + copy + + + + + + org.springframework + spring-aop + ${version.org.springframework} + + + org.springframework + spring-beans + ${version.org.springframework} + + + org.springframework + spring-context + ${version.org.springframework} + + + org.springframework + spring-context-support + ${version.org.springframework} + + + org.springframework + spring-core + ${version.org.springframework} + + + org.springframework + spring-expression + ${version.org.springframework} + + + org.springframework + spring-web + ${version.org.springframework} + + + org.springframework + spring-webmvc + ${version.org.springframework} + + + + aopalliance + aopalliance + ${version.aopalliance} + + + org.aspectj + aspectjrt + ${version.org.aspectj} + + + org.aspectj + aspectjweaver + ${version.org.aspectj} + + + + + ${module.spring.path} + true + true + true + + + + + + + + diff --git a/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java index 9d4dfc46d45..22391e49f0e 100644 --- a/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java +++ b/resteasy-spring-jboss/src/test/java/org/jboss/resteasy/spring/jboss/AddSpringResteasyAsResourceRootIT.java @@ -23,6 +23,7 @@ import org.jboss.resteasy.plugins.spring.SpringContextLoaderListener; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.exporter.ZipExporter; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.shrinkwrap.resolver.api.maven.Maven; @@ -30,11 +31,11 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.springframework.context.ApplicationContext; @RunWith(Arquillian.class) @RunAsClient public class AddSpringResteasyAsResourceRootIT { - private static final String DEPLOYMENT = "resteasy-spring-jboss-test"; @ArquillianResource private Deployer deployer; @@ -56,13 +57,12 @@ public void before() throws Exception { @After public void after() { deployer.undeploy(deploymentName); - } @Test public void testDeploymentWithSpringMvcDispatcherAddsResourceRoot() throws Exception { - deploymentName = DEPLOYMENT + "1"; + deploymentName = "deploymentWithSpringMvcDispatcher" + (springDependenciesInDeployment() ? "SpringIncluded" : "SpringInModule"); DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithSpringMvcDispatcher(deploymentName)); deploymentDescription.shouldBeManaged(false); @@ -70,14 +70,14 @@ public void testDeploymentWithSpringMvcDispatcherAddsResourceRoot() throws Excep deployer.deploy(deploymentDescription.getName()); assertResponse(deploymentName); - assertTrue(isResteasySpringClassIsLoaded(deploymentName)); + + assertTrue(springClassesAreAvailableToDeployment(deploymentName)); + assertTrue(resteasySpringClassesAreAvailableToDeployment(deploymentName)); } - // FIXME currently fails because of bug in implementation which is looking for org.resteasy.plugins.spring.SpringContextLoaderListener in web.xml, but it should be org.jboss.resteasy.plugins.spring.SpringContextLoaderListener - // https://issues.jboss.org/browse/EAP6-46 @Test public void testDeploymentWithSpringContextLoaderListenerAddsResourceRoot() throws Exception { - deploymentName = DEPLOYMENT + "2"; + deploymentName = "deploymentWithSpringContextLoaderListener" + (springDependenciesInDeployment() ? "SpringIncluded" : "SpringInModule"); DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithSpringContextLoaderListener(deploymentName)); deploymentDescription.shouldBeManaged(false); @@ -85,12 +85,14 @@ public void testDeploymentWithSpringContextLoaderListenerAddsResourceRoot() thro deployer.deploy(deploymentDescription.getName()); assertResponse(deploymentName); - assertTrue(isResteasySpringClassIsLoaded(deploymentName)); + + assertTrue(springClassesAreAvailableToDeployment(deploymentName)); + assertTrue(resteasySpringClassesAreAvailableToDeployment(deploymentName)); } @Test public void testDeploymentWithoutSpringMvcDispatcherOrListenerDoesNotAddResourceRoot() throws Exception { - deploymentName = DEPLOYMENT + "3"; + deploymentName = "deploymentWithoutSpringMvcDispatcherOrListener" + (springDependenciesInDeployment() ? "SpringIncluded" : "SpringInModule"); DeploymentDescription deploymentDescription = new DeploymentDescription(deploymentName, createDeploymentWithoutSpringMvcDispatcherOrListener(deploymentName)); deploymentDescription.shouldBeManaged(false); @@ -98,7 +100,8 @@ public void testDeploymentWithoutSpringMvcDispatcherOrListenerDoesNotAddResource deployer.deploy(deploymentDescription.getName()); assertResponse(deploymentName); - assertFalse(isResteasySpringClassIsLoaded(deploymentName)); + assertTrue(springClassesAreAvailableToDeployment(deploymentName)); + assertFalse(resteasySpringClassesAreAvailableToDeployment(deploymentName)); } @@ -107,18 +110,22 @@ private Archive createDeploymentWithoutSpringMvcDispatcherOrListener(String n WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") .addClass(TestResource.class) .addClass(TestApplication.class) - .addAsLibraries(resolveSpringDependencies()) .addAsWebInfResource("web-no-mvc-no-listener.xml", "web.xml") .addAsWebInfResource("applicationContext.xml"); + addSpringLibraries(archive); archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); return archive; } - private boolean isResteasySpringClassIsLoaded(String deploymentName) throws IOException, HttpException { + private boolean resteasySpringClassesAreAvailableToDeployment(String deploymentName) throws IOException, HttpException { - String CONTEXT_URL = "http://localhost:8080/" + deploymentName; + return isClassAvailableToDeployment(deploymentName, SpringContextLoaderListener.class); + } - String className = SpringContextLoaderListener.class.getName(); + private boolean isClassAvailableToDeployment(String deploymentName, Class clazz) throws IOException, + HttpException { + String className = clazz.getName(); + String CONTEXT_URL = "http://localhost:8080/" + deploymentName; HttpMethod httpMethod = new GetMethod(CONTEXT_URL + "/" + TestResource.LOAD_CLASS_PATH + "?" + CLASSNAME_PARAM + "=" + className); try { return (SC_OK == client.executeMethod(httpMethod)) @@ -128,6 +135,10 @@ private boolean isResteasySpringClassIsLoaded(String deploymentName) throws IOEx } } + private boolean springClassesAreAvailableToDeployment(String deploymentName) throws IOException, HttpException { + return isClassAvailableToDeployment(deploymentName, ApplicationContext.class); + } + private void assertResponse(String deploymentName) throws IOException, HttpException { String CONTEXT_URL = "http://localhost:8080/" + deploymentName; @@ -143,10 +154,11 @@ private WebArchive createDeploymentWithSpringMvcDispatcher(String name) { WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") .addClass(TestResource.class) - .addAsLibraries(resolveSpringDependencies()) .addAsWebInfResource("mvc-dispatcher-servlet/web.xml") .addAsWebInfResource("mvc-dispatcher-servlet/mvc-dispatcher-servlet.xml") .addAsWebInfResource("mvc-dispatcher-servlet/applicationContext.xml"); + + addSpringLibraries(archive); archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); return archive; } @@ -154,13 +166,25 @@ private WebArchive createDeploymentWithSpringMvcDispatcher(String name) { private Archive createDeploymentWithSpringContextLoaderListener(String name) { WebArchive archive = ShrinkWrap.create(WebArchive.class, name + ".war") .addClass(TestResource.class) - .addAsLibraries(resolveSpringDependencies()) .addAsWebInfResource("web.xml") .addAsWebInfResource("applicationContext.xml"); + addSpringLibraries(archive); archive.as(ZipExporter.class).exportTo(new File("target", name + ".war"), true); return archive; } + private void addSpringLibraries(WebArchive archive) { + if (springDependenciesInDeployment()) { + archive.addAsLibraries(resolveSpringDependencies()); + } else { + // you need to use the 'meta-inf' attribute to import the contents of meta-inf so spring can find the correct namespace handlers + if (isDefinedSystemProperty("use-jboss-deployment-structure")) + archive.addAsManifestResource("jboss-deployment-structure.xml"); + else + archive.addAsManifestResource(new StringAsset("Dependencies: org.springframework.spring meta-inf\n"), "MANIFEST.MF"); + } + } + private File[] resolveSpringDependencies() { List runtimeDependencies = new ArrayList(); runtimeDependencies.addAll(Arrays.asList(Maven.resolver().resolve("org.springframework:spring-core:" + springVersion).withTransitivity().asFile())); @@ -170,6 +194,10 @@ private File[] resolveSpringDependencies() { return dependencies; } + private boolean springDependenciesInDeployment() { + return ! isDefinedSystemProperty("spring-in-module"); + } + private String getSpringVersion() { @@ -181,5 +209,9 @@ private String readSystemProperty(String name, String defaultValue) { return (value == null) ? defaultValue : value; } + private boolean isDefinedSystemProperty(String name) { + String value = System.getProperty(name); + return (value != null); + } } diff --git a/resteasy-spring-jboss/src/test/modules/spring/3.2.x/module.xml b/resteasy-spring-jboss/src/test/modules/spring/3.2.x/module.xml new file mode 100644 index 00000000000..3b8feee58d3 --- /dev/null +++ b/resteasy-spring-jboss/src/test/modules/spring/3.2.x/module.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resteasy-spring-jboss/src/test/resources/jboss-deployment-structure.xml b/resteasy-spring-jboss/src/test/resources/jboss-deployment-structure.xml new file mode 100644 index 00000000000..6e169dd32ab --- /dev/null +++ b/resteasy-spring-jboss/src/test/resources/jboss-deployment-structure.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 5a5c7ff7ead31628b45879e170a7cdf1a3de3fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Wed, 19 Mar 2014 09:00:50 +0100 Subject: [PATCH 7/9] [RESTEASY-1030] improve error reporting for empty configuration parameter javax.ws.rs.Application --- .../resteasy/spi/ResteasyDeploymentTest.java | 12 +++++++ .../resteasy/spi/ResteasyDeployment.java | 33 ++++++++++--------- 2 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 resteasy-jaxrs-test/src/test/java/org/jboss/resteasy/spi/ResteasyDeploymentTest.java diff --git a/resteasy-jaxrs-test/src/test/java/org/jboss/resteasy/spi/ResteasyDeploymentTest.java b/resteasy-jaxrs-test/src/test/java/org/jboss/resteasy/spi/ResteasyDeploymentTest.java new file mode 100644 index 00000000000..ae455e36a38 --- /dev/null +++ b/resteasy-jaxrs-test/src/test/java/org/jboss/resteasy/spi/ResteasyDeploymentTest.java @@ -0,0 +1,12 @@ +package org.jboss.resteasy.spi; + +import org.junit.Test; + +public class ResteasyDeploymentTest { + + @Test(expected = ApplicationException.class) + public void testWhenApplicationClassIsEmptyExceptionIsTrown() throws Exception { + String applicationClass = ""; + ResteasyDeployment.createApplication(applicationClass, null); + } +} diff --git a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/spi/ResteasyDeployment.java b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/spi/ResteasyDeployment.java index 59bbb590fdb..32833109fca 100644 --- a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/spi/ResteasyDeployment.java +++ b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/spi/ResteasyDeployment.java @@ -1,5 +1,16 @@ package org.jboss.resteasy.spi; +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.core.Application; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.ext.Provider; +import javax.ws.rs.ext.Providers; + import org.jboss.resteasy.core.AcceptParameterHttpPreprocessor; import org.jboss.resteasy.core.AsynchronousDispatcher; import org.jboss.resteasy.core.Dispatcher; @@ -9,20 +20,9 @@ import org.jboss.resteasy.plugins.interceptors.SecurityInterceptor; import org.jboss.resteasy.plugins.providers.RegisterBuiltin; import org.jboss.resteasy.plugins.server.resourcefactory.JndiComponentResourceFactory; -import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters; import org.jboss.resteasy.util.GetRestful; import org.jboss.resteasy.util.PickConstructor; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.ext.Provider; -import javax.ws.rs.ext.Providers; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * This class is used to configure and initialize the core components of RESTEasy. * @@ -72,7 +72,7 @@ public class ResteasyDeployment public void start() { // it is very important that each deployment create their own provider factory - // this allows each WAR to have their own set of providers + // this allows each WAR to have their own set of providers if (providerFactory == null) providerFactory = new ResteasyProviderFactory(); providerFactory.setRegisterBuiltins(registerBuiltin); @@ -126,7 +126,7 @@ public void start() // push context data so we can inject it Map contextDataMap = ResteasyProviderFactory.getContextDataMap(); contextDataMap.putAll(dispatcher.getDefaultContextObjects()); - + try { if (injectorFactoryClass != null) @@ -157,7 +157,7 @@ public void start() providerFactory.setInjectorFactory(injectorFactory); } - // feed context data map with constructed objects + // feed context data map with constructed objects // see ResteasyContextParameters.RESTEASY_CONTEXT_OBJECTS if (constructedDefaultContextObjects != null && constructedDefaultContextObjects.size() > 0) { @@ -264,7 +264,10 @@ public void start() public static Application createApplication(String applicationClass, ResteasyProviderFactory providerFactory) { - return (Application) createFromInjectorFactory(applicationClass, providerFactory); + if (applicationClass == null || applicationClass.trim().equals("")) { + throw new ApplicationException("The implementation of javax.ws.rs.core.Application must be specified.", null); + } + return (Application) createFromInjectorFactory(applicationClass, providerFactory); } public static Object createFromInjectorFactory(String classname, ResteasyProviderFactory providerFactory) From 63f085f829b492bbbaf702b811855b6be82b8cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Wed, 19 Mar 2014 10:26:59 +0100 Subject: [PATCH 8/9] remove intellij idea project files from version control --- .../RESTEASY-736/RESTEASY-736-jetty.iml | 80 -------- .../RESTEASY-752/RESTEASY-752-jetty.iml | 82 -------- .../RESTEASY-760/RESTEASY-760-jetty.iml | 80 -------- .../RESTEASY-767/RESTEASY-767-jetty.iml | 79 -------- arquillian/RESTEASY-800/RESTEASY-800-AS71.iml | 189 ------------------ arquillian/RESTEASY-802/RESTEASY-802-AS71.iml | 188 ----------------- arquillian/arquillian.iml | 13 -- .../async-http-jbossweb.iml | 31 --- .../asynch-http-jbossweb-pom.iml | 13 -- .../async-http-servlet-3.0-test.iml | 44 ---- .../async-http-servlet-3.0.iml | 30 --- .../asynch-http-servlet-3.0-pom.iml | 13 -- .../async-http-tomcat6.iml | 35 ---- async-http-tomcat/asynch-http-tomcat-pom.iml | 13 -- eagledns/eagledns-fork.iml | 21 -- .../examples-async-job-service.iml | 36 ---- .../no-dns/doseta-no-dns-example.iml | 43 ---- .../signature-examples-pom.iml | 13 -- .../use-dns/doseta-use-dns-example.iml | 46 ----- examples/examples-jsapi/examples-jsapi.iml | 32 --- examples/guice-hello/examples-guice-hello.iml | 37 ---- examples/jaxb-json/examples-jaxb-json.iml | 33 --- .../examples-oauth-authenticator.iml | 38 ---- .../oauth-examples-authenticator-pom.iml | 13 -- .../oauth/examples-oauth-no-filter.iml | 38 ---- .../oauth-examples/oauth-examples-pom.iml | 13 -- .../examples-oauth-provider.iml | 32 --- ...amples-oauth-push-messaging-openid-all.iml | 13 -- ...s-oauth-push-messaging-openid-provider.iml | 28 --- .../examples-oauth-push-messaging-sso.iml | 41 ---- .../examples-oauth-push-messaging.iml | 38 ---- .../oauth-examples/oauth/examples-oauth.iml | 41 ---- .../ex03_1/workbook-ex03_1.iml | 35 ---- .../ex04_1/workbook-ex04_1.iml | 36 ---- .../ex04_2/workbook-ex04_2.iml | 35 ---- .../ex04_3/workbook-ex04_3.iml | 35 ---- .../ex05_1/workbook-ex05_1.iml | 36 ---- .../ex05_2/workbook-ex05_2.iml | 33 --- .../ex06_1/workbook-ex06_1.iml | 39 ---- .../ex06_2/workbook-ex06_2.iml | 35 ---- .../ex07_1/workbook-ex07_1.iml | 39 ---- .../ex08_1/workbook-ex08_1.iml | 41 ---- .../ex08_2/workbook-ex08_2.iml | 36 ---- .../ex09_1/workbook-ex09_1.iml | 40 ---- .../ex09_2/workbook-ex09_2.iml | 40 ---- .../ex10_1/workbook-ex10_1.iml | 40 ---- .../ex11_2/workbook-ex11_2.iml | 60 ------ examples/oreilly-workbook/workbook-pom.iml | 14 -- .../examples-resteasy-springMVC.iml | 86 -------- examples/smime/doseta-no-dns-example (2).iml | 48 ----- examples/smime/smime-example.iml | 46 ----- examples/testable-examples-pom.iml | 13 -- jaxrs-api/jaxrs-api.iml | 17 -- jboss-modules/resteasy-jboss-modules.iml | 46 ----- profiling-tests/profiling-tests.iml | 63 ------ .../resteasy-fastinfoset-provider.iml | 53 ----- .../jackson/resteasy-jackson-provider.iml | 47 ----- providers/jaxb/resteasy-jaxb-provider.iml | 40 ---- .../jettison/resteasy-jettison-provider.iml | 42 ---- .../multipart/resteasy-multipart-provider.iml | 43 ---- providers/providers-pom.iml | 13 -- .../resteasy-atom/resteasy-atom-provider.iml | 42 ---- .../resteasy-hibernatevalidator-provider.iml | 41 ---- providers/resteasy-html/resteasy-html.iml | 33 --- providers/test-all-jaxb/test-all-jaxb.iml | 53 ----- .../test-jackson-jaxb-coexistence.iml | 45 ----- .../test-resteasy-html/test-resteasy-html.iml | 32 --- providers/yaml/resteasy-yaml-provider.iml | 38 ---- resteasy-bom/resteasy-bom.iml | 13 -- .../resteasy-cache-core.iml | 41 ---- resteasy-cache/resteasy-cache-pom.iml | 13 -- resteasy-cdi/resteasy-cdi.iml | 41 ---- resteasy-guice/resteasy-guice.iml | 37 ---- resteasy-jaxrs-all.iml | 13 -- resteasy-jaxrs-war/resteasy-jaxrs-war.iml | 43 ---- resteasy-jaxrs/resteasy-jaxrs.iml | 38 ---- .../resteasy-jsapi-testing.iml | 67 ------- resteasy-jsapi/resteasy-jsapi.iml | 35 ---- resteasy-links/resteasy-links.iml | 45 ----- resteasy-spring/resteasy-spring.iml | 63 ------ resteasy-test-data/resteasy-test-data.iml | 24 --- security/resteasy-crypto/resteasy-crypto.iml | 49 ----- security/resteasy-oauth/resteasy-oauth.iml | 32 --- security/security-pom.iml | 13 -- server-adapters/http-adapter-pom.iml | 13 -- .../resteasy-jdk-http/resteasy-jdk-http.iml | 34 ---- .../resteasy-netty/resteasy-netty.iml | 35 ---- tjws/tjws.iml | 18 -- .../application-test/test-application-war.iml | 41 ---- war-tests/context-test/test-context-war.iml | 37 ---- war-tests/encoding-test/test-encoding-war.iml | 36 ---- war-tests/filter-test/test-filter-war.iml | 40 ---- .../test-oauth-servlet-war.iml | 42 ---- war-tests/war-tests-pom.iml | 13 -- 94 files changed, 3757 deletions(-) delete mode 100644 arquillian/RESTEASY-736/RESTEASY-736-jetty.iml delete mode 100644 arquillian/RESTEASY-752/RESTEASY-752-jetty.iml delete mode 100644 arquillian/RESTEASY-760/RESTEASY-760-jetty.iml delete mode 100644 arquillian/RESTEASY-767/RESTEASY-767-jetty.iml delete mode 100644 arquillian/RESTEASY-800/RESTEASY-800-AS71.iml delete mode 100644 arquillian/RESTEASY-802/RESTEASY-802-AS71.iml delete mode 100644 arquillian/arquillian.iml delete mode 100644 async-http-jbossweb/async-http-jbossweb-jar/async-http-jbossweb.iml delete mode 100644 async-http-jbossweb/asynch-http-jbossweb-pom.iml delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0-test/async-http-servlet-3.0-test.iml delete mode 100644 async-http-servlet-3.0/async-http-servlet-3.0/async-http-servlet-3.0.iml delete mode 100644 async-http-servlet-3.0/asynch-http-servlet-3.0-pom.iml delete mode 100644 async-http-tomcat/asynch-http-tomcat-jar/async-http-tomcat6.iml delete mode 100644 async-http-tomcat/asynch-http-tomcat-pom.iml delete mode 100644 eagledns/eagledns-fork.iml delete mode 100644 examples/async-job-service/examples-async-job-service.iml delete mode 100644 examples/digital-signatures/no-dns/doseta-no-dns-example.iml delete mode 100644 examples/digital-signatures/signature-examples-pom.iml delete mode 100644 examples/digital-signatures/use-dns/doseta-use-dns-example.iml delete mode 100644 examples/examples-jsapi/examples-jsapi.iml delete mode 100644 examples/guice-hello/examples-guice-hello.iml delete mode 100644 examples/jaxb-json/examples-jaxb-json.iml delete mode 100644 examples/oauth-examples/oauth-catalina-authenticator/authenticator/examples-oauth-authenticator.iml delete mode 100644 examples/oauth-examples/oauth-catalina-authenticator/oauth-examples-authenticator-pom.iml delete mode 100644 examples/oauth-examples/oauth-catalina-authenticator/oauth/examples-oauth-no-filter.iml delete mode 100644 examples/oauth-examples/oauth-examples-pom.iml delete mode 100644 examples/oauth-examples/oauth-provider/examples-oauth-provider.iml delete mode 100644 examples/oauth-examples/oauth-push-messaging-openid/examples-oauth-push-messaging-openid-all.iml delete mode 100644 examples/oauth-examples/oauth-push-messaging-openid/openid/examples-oauth-push-messaging-openid-provider.iml delete mode 100644 examples/oauth-examples/oauth-push-messaging-openid/push-messaging/examples-oauth-push-messaging-sso.iml delete mode 100644 examples/oauth-examples/oauth-push-messaging/examples-oauth-push-messaging.iml delete mode 100644 examples/oauth-examples/oauth/examples-oauth.iml delete mode 100644 examples/oreilly-workbook/ex03_1/workbook-ex03_1.iml delete mode 100644 examples/oreilly-workbook/ex04_1/workbook-ex04_1.iml delete mode 100644 examples/oreilly-workbook/ex04_2/workbook-ex04_2.iml delete mode 100644 examples/oreilly-workbook/ex04_3/workbook-ex04_3.iml delete mode 100644 examples/oreilly-workbook/ex05_1/workbook-ex05_1.iml delete mode 100644 examples/oreilly-workbook/ex05_2/workbook-ex05_2.iml delete mode 100644 examples/oreilly-workbook/ex06_1/workbook-ex06_1.iml delete mode 100644 examples/oreilly-workbook/ex06_2/workbook-ex06_2.iml delete mode 100644 examples/oreilly-workbook/ex07_1/workbook-ex07_1.iml delete mode 100644 examples/oreilly-workbook/ex08_1/workbook-ex08_1.iml delete mode 100644 examples/oreilly-workbook/ex08_2/workbook-ex08_2.iml delete mode 100644 examples/oreilly-workbook/ex09_1/workbook-ex09_1.iml delete mode 100644 examples/oreilly-workbook/ex09_2/workbook-ex09_2.iml delete mode 100644 examples/oreilly-workbook/ex10_1/workbook-ex10_1.iml delete mode 100644 examples/oreilly-workbook/ex11_2/workbook-ex11_2.iml delete mode 100644 examples/oreilly-workbook/workbook-pom.iml delete mode 100644 examples/resteasy-springMVC/examples-resteasy-springMVC.iml delete mode 100644 examples/smime/doseta-no-dns-example (2).iml delete mode 100644 examples/smime/smime-example.iml delete mode 100644 examples/testable-examples-pom.iml delete mode 100644 jaxrs-api/jaxrs-api.iml delete mode 100644 jboss-modules/resteasy-jboss-modules.iml delete mode 100644 profiling-tests/profiling-tests.iml delete mode 100644 providers/fastinfoset/resteasy-fastinfoset-provider.iml delete mode 100644 providers/jackson/resteasy-jackson-provider.iml delete mode 100644 providers/jaxb/resteasy-jaxb-provider.iml delete mode 100644 providers/jettison/resteasy-jettison-provider.iml delete mode 100644 providers/multipart/resteasy-multipart-provider.iml delete mode 100644 providers/providers-pom.iml delete mode 100644 providers/resteasy-atom/resteasy-atom-provider.iml delete mode 100644 providers/resteasy-hibernatevalidator-provider/resteasy-hibernatevalidator-provider.iml delete mode 100644 providers/resteasy-html/resteasy-html.iml delete mode 100644 providers/test-all-jaxb/test-all-jaxb.iml delete mode 100644 providers/test-jackson-jaxb-coexistence/test-jackson-jaxb-coexistence.iml delete mode 100644 providers/test-resteasy-html/test-resteasy-html.iml delete mode 100644 providers/yaml/resteasy-yaml-provider.iml delete mode 100644 resteasy-bom/resteasy-bom.iml delete mode 100644 resteasy-cache/resteasy-cache-core/resteasy-cache-core.iml delete mode 100644 resteasy-cache/resteasy-cache-pom.iml delete mode 100644 resteasy-cdi/resteasy-cdi.iml delete mode 100644 resteasy-guice/resteasy-guice.iml delete mode 100644 resteasy-jaxrs-all.iml delete mode 100644 resteasy-jaxrs-war/resteasy-jaxrs-war.iml delete mode 100644 resteasy-jaxrs/resteasy-jaxrs.iml delete mode 100644 resteasy-jsapi-testing/resteasy-jsapi-testing.iml delete mode 100644 resteasy-jsapi/resteasy-jsapi.iml delete mode 100644 resteasy-links/resteasy-links.iml delete mode 100644 resteasy-spring/resteasy-spring.iml delete mode 100644 resteasy-test-data/resteasy-test-data.iml delete mode 100644 security/resteasy-crypto/resteasy-crypto.iml delete mode 100644 security/resteasy-oauth/resteasy-oauth.iml delete mode 100644 security/security-pom.iml delete mode 100644 server-adapters/http-adapter-pom.iml delete mode 100644 server-adapters/resteasy-jdk-http/resteasy-jdk-http.iml delete mode 100644 server-adapters/resteasy-netty/resteasy-netty.iml delete mode 100644 tjws/tjws.iml delete mode 100644 war-tests/application-test/test-application-war.iml delete mode 100644 war-tests/context-test/test-context-war.iml delete mode 100644 war-tests/encoding-test/test-encoding-war.iml delete mode 100644 war-tests/filter-test/test-filter-war.iml delete mode 100644 war-tests/oauth-servlet-test/test-oauth-servlet-war.iml delete mode 100644 war-tests/war-tests-pom.iml diff --git a/arquillian/RESTEASY-736/RESTEASY-736-jetty.iml b/arquillian/RESTEASY-736/RESTEASY-736-jetty.iml deleted file mode 100644 index 27e0307ffd1..00000000000 --- a/arquillian/RESTEASY-736/RESTEASY-736-jetty.iml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/RESTEASY-752/RESTEASY-752-jetty.iml b/arquillian/RESTEASY-752/RESTEASY-752-jetty.iml deleted file mode 100644 index e18e2844f7b..00000000000 --- a/arquillian/RESTEASY-752/RESTEASY-752-jetty.iml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/RESTEASY-760/RESTEASY-760-jetty.iml b/arquillian/RESTEASY-760/RESTEASY-760-jetty.iml deleted file mode 100644 index 27e0307ffd1..00000000000 --- a/arquillian/RESTEASY-760/RESTEASY-760-jetty.iml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/RESTEASY-767/RESTEASY-767-jetty.iml b/arquillian/RESTEASY-767/RESTEASY-767-jetty.iml deleted file mode 100644 index d269874d8b9..00000000000 --- a/arquillian/RESTEASY-767/RESTEASY-767-jetty.iml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/RESTEASY-800/RESTEASY-800-AS71.iml b/arquillian/RESTEASY-800/RESTEASY-800-AS71.iml deleted file mode 100644 index a569f8554c5..00000000000 --- a/arquillian/RESTEASY-800/RESTEASY-800-AS71.iml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/RESTEASY-802/RESTEASY-802-AS71.iml b/arquillian/RESTEASY-802/RESTEASY-802-AS71.iml deleted file mode 100644 index 8d0c53f6d0d..00000000000 --- a/arquillian/RESTEASY-802/RESTEASY-802-AS71.iml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arquillian/arquillian.iml b/arquillian/arquillian.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/arquillian/arquillian.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/async-http-jbossweb/async-http-jbossweb-jar/async-http-jbossweb.iml b/async-http-jbossweb/async-http-jbossweb-jar/async-http-jbossweb.iml deleted file mode 100644 index c9f35b8100e..00000000000 --- a/async-http-jbossweb/async-http-jbossweb-jar/async-http-jbossweb.iml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/async-http-jbossweb/asynch-http-jbossweb-pom.iml b/async-http-jbossweb/asynch-http-jbossweb-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/async-http-jbossweb/asynch-http-jbossweb-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/async-http-servlet-3.0/async-http-servlet-3.0-test/async-http-servlet-3.0-test.iml b/async-http-servlet-3.0/async-http-servlet-3.0-test/async-http-servlet-3.0-test.iml deleted file mode 100644 index 6f5ad02f8b5..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0-test/async-http-servlet-3.0-test.iml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/async-http-servlet-3.0/async-http-servlet-3.0/async-http-servlet-3.0.iml b/async-http-servlet-3.0/async-http-servlet-3.0/async-http-servlet-3.0.iml deleted file mode 100644 index 891de5d0b36..00000000000 --- a/async-http-servlet-3.0/async-http-servlet-3.0/async-http-servlet-3.0.iml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/async-http-servlet-3.0/asynch-http-servlet-3.0-pom.iml b/async-http-servlet-3.0/asynch-http-servlet-3.0-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/async-http-servlet-3.0/asynch-http-servlet-3.0-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/async-http-tomcat/asynch-http-tomcat-jar/async-http-tomcat6.iml b/async-http-tomcat/asynch-http-tomcat-jar/async-http-tomcat6.iml deleted file mode 100644 index 719dc74aafd..00000000000 --- a/async-http-tomcat/asynch-http-tomcat-jar/async-http-tomcat6.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/async-http-tomcat/asynch-http-tomcat-pom.iml b/async-http-tomcat/asynch-http-tomcat-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/async-http-tomcat/asynch-http-tomcat-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/eagledns/eagledns-fork.iml b/eagledns/eagledns-fork.iml deleted file mode 100644 index 0a29f3eace1..00000000000 --- a/eagledns/eagledns-fork.iml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/async-job-service/examples-async-job-service.iml b/examples/async-job-service/examples-async-job-service.iml deleted file mode 100644 index 3873641b7d0..00000000000 --- a/examples/async-job-service/examples-async-job-service.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/digital-signatures/no-dns/doseta-no-dns-example.iml b/examples/digital-signatures/no-dns/doseta-no-dns-example.iml deleted file mode 100644 index fafbf92216d..00000000000 --- a/examples/digital-signatures/no-dns/doseta-no-dns-example.iml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/digital-signatures/signature-examples-pom.iml b/examples/digital-signatures/signature-examples-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/examples/digital-signatures/signature-examples-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/digital-signatures/use-dns/doseta-use-dns-example.iml b/examples/digital-signatures/use-dns/doseta-use-dns-example.iml deleted file mode 100644 index 0d07eea81f6..00000000000 --- a/examples/digital-signatures/use-dns/doseta-use-dns-example.iml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/examples-jsapi/examples-jsapi.iml b/examples/examples-jsapi/examples-jsapi.iml deleted file mode 100644 index e9b3fb193c9..00000000000 --- a/examples/examples-jsapi/examples-jsapi.iml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/guice-hello/examples-guice-hello.iml b/examples/guice-hello/examples-guice-hello.iml deleted file mode 100644 index cebbec30dae..00000000000 --- a/examples/guice-hello/examples-guice-hello.iml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/jaxb-json/examples-jaxb-json.iml b/examples/jaxb-json/examples-jaxb-json.iml deleted file mode 100644 index f4f39ca6cf4..00000000000 --- a/examples/jaxb-json/examples-jaxb-json.iml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-catalina-authenticator/authenticator/examples-oauth-authenticator.iml b/examples/oauth-examples/oauth-catalina-authenticator/authenticator/examples-oauth-authenticator.iml deleted file mode 100644 index 29f6372c268..00000000000 --- a/examples/oauth-examples/oauth-catalina-authenticator/authenticator/examples-oauth-authenticator.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-catalina-authenticator/oauth-examples-authenticator-pom.iml b/examples/oauth-examples/oauth-catalina-authenticator/oauth-examples-authenticator-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/examples/oauth-examples/oauth-catalina-authenticator/oauth-examples-authenticator-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-catalina-authenticator/oauth/examples-oauth-no-filter.iml b/examples/oauth-examples/oauth-catalina-authenticator/oauth/examples-oauth-no-filter.iml deleted file mode 100644 index 10bef18fbd4..00000000000 --- a/examples/oauth-examples/oauth-catalina-authenticator/oauth/examples-oauth-no-filter.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-examples-pom.iml b/examples/oauth-examples/oauth-examples-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/examples/oauth-examples/oauth-examples-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-provider/examples-oauth-provider.iml b/examples/oauth-examples/oauth-provider/examples-oauth-provider.iml deleted file mode 100644 index 185ae5b50d2..00000000000 --- a/examples/oauth-examples/oauth-provider/examples-oauth-provider.iml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-push-messaging-openid/examples-oauth-push-messaging-openid-all.iml b/examples/oauth-examples/oauth-push-messaging-openid/examples-oauth-push-messaging-openid-all.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/examples/oauth-examples/oauth-push-messaging-openid/examples-oauth-push-messaging-openid-all.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-push-messaging-openid/openid/examples-oauth-push-messaging-openid-provider.iml b/examples/oauth-examples/oauth-push-messaging-openid/openid/examples-oauth-push-messaging-openid-provider.iml deleted file mode 100644 index f182fb09b2b..00000000000 --- a/examples/oauth-examples/oauth-push-messaging-openid/openid/examples-oauth-push-messaging-openid-provider.iml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-push-messaging-openid/push-messaging/examples-oauth-push-messaging-sso.iml b/examples/oauth-examples/oauth-push-messaging-openid/push-messaging/examples-oauth-push-messaging-sso.iml deleted file mode 100644 index 236bd4b16ec..00000000000 --- a/examples/oauth-examples/oauth-push-messaging-openid/push-messaging/examples-oauth-push-messaging-sso.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth-push-messaging/examples-oauth-push-messaging.iml b/examples/oauth-examples/oauth-push-messaging/examples-oauth-push-messaging.iml deleted file mode 100644 index c77afc79098..00000000000 --- a/examples/oauth-examples/oauth-push-messaging/examples-oauth-push-messaging.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oauth-examples/oauth/examples-oauth.iml b/examples/oauth-examples/oauth/examples-oauth.iml deleted file mode 100644 index a962fdc139a..00000000000 --- a/examples/oauth-examples/oauth/examples-oauth.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex03_1/workbook-ex03_1.iml b/examples/oreilly-workbook/ex03_1/workbook-ex03_1.iml deleted file mode 100644 index 1498971a475..00000000000 --- a/examples/oreilly-workbook/ex03_1/workbook-ex03_1.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex04_1/workbook-ex04_1.iml b/examples/oreilly-workbook/ex04_1/workbook-ex04_1.iml deleted file mode 100644 index cca8bef9b3a..00000000000 --- a/examples/oreilly-workbook/ex04_1/workbook-ex04_1.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex04_2/workbook-ex04_2.iml b/examples/oreilly-workbook/ex04_2/workbook-ex04_2.iml deleted file mode 100644 index b49ba4ed55d..00000000000 --- a/examples/oreilly-workbook/ex04_2/workbook-ex04_2.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex04_3/workbook-ex04_3.iml b/examples/oreilly-workbook/ex04_3/workbook-ex04_3.iml deleted file mode 100644 index 24ec00115f0..00000000000 --- a/examples/oreilly-workbook/ex04_3/workbook-ex04_3.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex05_1/workbook-ex05_1.iml b/examples/oreilly-workbook/ex05_1/workbook-ex05_1.iml deleted file mode 100644 index 3c49de8f0ce..00000000000 --- a/examples/oreilly-workbook/ex05_1/workbook-ex05_1.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex05_2/workbook-ex05_2.iml b/examples/oreilly-workbook/ex05_2/workbook-ex05_2.iml deleted file mode 100644 index a6af8319380..00000000000 --- a/examples/oreilly-workbook/ex05_2/workbook-ex05_2.iml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex06_1/workbook-ex06_1.iml b/examples/oreilly-workbook/ex06_1/workbook-ex06_1.iml deleted file mode 100644 index 6dd7920f557..00000000000 --- a/examples/oreilly-workbook/ex06_1/workbook-ex06_1.iml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex06_2/workbook-ex06_2.iml b/examples/oreilly-workbook/ex06_2/workbook-ex06_2.iml deleted file mode 100644 index 2aa725f7af8..00000000000 --- a/examples/oreilly-workbook/ex06_2/workbook-ex06_2.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex07_1/workbook-ex07_1.iml b/examples/oreilly-workbook/ex07_1/workbook-ex07_1.iml deleted file mode 100644 index 77f98d302c5..00000000000 --- a/examples/oreilly-workbook/ex07_1/workbook-ex07_1.iml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex08_1/workbook-ex08_1.iml b/examples/oreilly-workbook/ex08_1/workbook-ex08_1.iml deleted file mode 100644 index 6f41a593bc5..00000000000 --- a/examples/oreilly-workbook/ex08_1/workbook-ex08_1.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex08_2/workbook-ex08_2.iml b/examples/oreilly-workbook/ex08_2/workbook-ex08_2.iml deleted file mode 100644 index 307338d9df2..00000000000 --- a/examples/oreilly-workbook/ex08_2/workbook-ex08_2.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex09_1/workbook-ex09_1.iml b/examples/oreilly-workbook/ex09_1/workbook-ex09_1.iml deleted file mode 100644 index 1da37c493d6..00000000000 --- a/examples/oreilly-workbook/ex09_1/workbook-ex09_1.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex09_2/workbook-ex09_2.iml b/examples/oreilly-workbook/ex09_2/workbook-ex09_2.iml deleted file mode 100644 index 760ccd2459b..00000000000 --- a/examples/oreilly-workbook/ex09_2/workbook-ex09_2.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex10_1/workbook-ex10_1.iml b/examples/oreilly-workbook/ex10_1/workbook-ex10_1.iml deleted file mode 100644 index db080dd9abb..00000000000 --- a/examples/oreilly-workbook/ex10_1/workbook-ex10_1.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/ex11_2/workbook-ex11_2.iml b/examples/oreilly-workbook/ex11_2/workbook-ex11_2.iml deleted file mode 100644 index 6638f14bab1..00000000000 --- a/examples/oreilly-workbook/ex11_2/workbook-ex11_2.iml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/oreilly-workbook/workbook-pom.iml b/examples/oreilly-workbook/workbook-pom.iml deleted file mode 100644 index b3972ccaf2f..00000000000 --- a/examples/oreilly-workbook/workbook-pom.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/examples/resteasy-springMVC/examples-resteasy-springMVC.iml b/examples/resteasy-springMVC/examples-resteasy-springMVC.iml deleted file mode 100644 index 48875f337b7..00000000000 --- a/examples/resteasy-springMVC/examples-resteasy-springMVC.iml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/smime/doseta-no-dns-example (2).iml b/examples/smime/doseta-no-dns-example (2).iml deleted file mode 100644 index cc767c0ea0e..00000000000 --- a/examples/smime/doseta-no-dns-example (2).iml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/smime/smime-example.iml b/examples/smime/smime-example.iml deleted file mode 100644 index 2b6ada33868..00000000000 --- a/examples/smime/smime-example.iml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/testable-examples-pom.iml b/examples/testable-examples-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/examples/testable-examples-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/jaxrs-api/jaxrs-api.iml b/jaxrs-api/jaxrs-api.iml deleted file mode 100644 index caf1a821e4a..00000000000 --- a/jaxrs-api/jaxrs-api.iml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/jboss-modules/resteasy-jboss-modules.iml b/jboss-modules/resteasy-jboss-modules.iml deleted file mode 100644 index c0dc76f4ca5..00000000000 --- a/jboss-modules/resteasy-jboss-modules.iml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/profiling-tests/profiling-tests.iml b/profiling-tests/profiling-tests.iml deleted file mode 100644 index 9b16e787113..00000000000 --- a/profiling-tests/profiling-tests.iml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/fastinfoset/resteasy-fastinfoset-provider.iml b/providers/fastinfoset/resteasy-fastinfoset-provider.iml deleted file mode 100644 index aea132b1ebc..00000000000 --- a/providers/fastinfoset/resteasy-fastinfoset-provider.iml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/jackson/resteasy-jackson-provider.iml b/providers/jackson/resteasy-jackson-provider.iml deleted file mode 100644 index 6d38d3ddb68..00000000000 --- a/providers/jackson/resteasy-jackson-provider.iml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/jaxb/resteasy-jaxb-provider.iml b/providers/jaxb/resteasy-jaxb-provider.iml deleted file mode 100644 index b1a456c4af6..00000000000 --- a/providers/jaxb/resteasy-jaxb-provider.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/jettison/resteasy-jettison-provider.iml b/providers/jettison/resteasy-jettison-provider.iml deleted file mode 100644 index f1a25b62bac..00000000000 --- a/providers/jettison/resteasy-jettison-provider.iml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/multipart/resteasy-multipart-provider.iml b/providers/multipart/resteasy-multipart-provider.iml deleted file mode 100644 index efa0d9c9265..00000000000 --- a/providers/multipart/resteasy-multipart-provider.iml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/providers-pom.iml b/providers/providers-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/providers/providers-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/providers/resteasy-atom/resteasy-atom-provider.iml b/providers/resteasy-atom/resteasy-atom-provider.iml deleted file mode 100644 index efef16b3168..00000000000 --- a/providers/resteasy-atom/resteasy-atom-provider.iml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/resteasy-hibernatevalidator-provider/resteasy-hibernatevalidator-provider.iml b/providers/resteasy-hibernatevalidator-provider/resteasy-hibernatevalidator-provider.iml deleted file mode 100644 index 24255f0fa88..00000000000 --- a/providers/resteasy-hibernatevalidator-provider/resteasy-hibernatevalidator-provider.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/resteasy-html/resteasy-html.iml b/providers/resteasy-html/resteasy-html.iml deleted file mode 100644 index 488228542c9..00000000000 --- a/providers/resteasy-html/resteasy-html.iml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/test-all-jaxb/test-all-jaxb.iml b/providers/test-all-jaxb/test-all-jaxb.iml deleted file mode 100644 index 9a8836021ba..00000000000 --- a/providers/test-all-jaxb/test-all-jaxb.iml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/test-jackson-jaxb-coexistence/test-jackson-jaxb-coexistence.iml b/providers/test-jackson-jaxb-coexistence/test-jackson-jaxb-coexistence.iml deleted file mode 100644 index 92bf103e8a9..00000000000 --- a/providers/test-jackson-jaxb-coexistence/test-jackson-jaxb-coexistence.iml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/test-resteasy-html/test-resteasy-html.iml b/providers/test-resteasy-html/test-resteasy-html.iml deleted file mode 100644 index 46f9b00ad0a..00000000000 --- a/providers/test-resteasy-html/test-resteasy-html.iml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/providers/yaml/resteasy-yaml-provider.iml b/providers/yaml/resteasy-yaml-provider.iml deleted file mode 100644 index c1f325ab5e6..00000000000 --- a/providers/yaml/resteasy-yaml-provider.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-bom/resteasy-bom.iml b/resteasy-bom/resteasy-bom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/resteasy-bom/resteasy-bom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/resteasy-cache/resteasy-cache-core/resteasy-cache-core.iml b/resteasy-cache/resteasy-cache-core/resteasy-cache-core.iml deleted file mode 100644 index 3c7b314bc52..00000000000 --- a/resteasy-cache/resteasy-cache-core/resteasy-cache-core.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-cache/resteasy-cache-pom.iml b/resteasy-cache/resteasy-cache-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/resteasy-cache/resteasy-cache-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/resteasy-cdi/resteasy-cdi.iml b/resteasy-cdi/resteasy-cdi.iml deleted file mode 100644 index d3d7c7853ef..00000000000 --- a/resteasy-cdi/resteasy-cdi.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-guice/resteasy-guice.iml b/resteasy-guice/resteasy-guice.iml deleted file mode 100644 index bc6e63f3c5a..00000000000 --- a/resteasy-guice/resteasy-guice.iml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-jaxrs-all.iml b/resteasy-jaxrs-all.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/resteasy-jaxrs-all.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/resteasy-jaxrs-war/resteasy-jaxrs-war.iml b/resteasy-jaxrs-war/resteasy-jaxrs-war.iml deleted file mode 100644 index efa7e29af64..00000000000 --- a/resteasy-jaxrs-war/resteasy-jaxrs-war.iml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-jaxrs/resteasy-jaxrs.iml b/resteasy-jaxrs/resteasy-jaxrs.iml deleted file mode 100644 index 02832fcd629..00000000000 --- a/resteasy-jaxrs/resteasy-jaxrs.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-jsapi-testing/resteasy-jsapi-testing.iml b/resteasy-jsapi-testing/resteasy-jsapi-testing.iml deleted file mode 100644 index fc714981ebf..00000000000 --- a/resteasy-jsapi-testing/resteasy-jsapi-testing.iml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-jsapi/resteasy-jsapi.iml b/resteasy-jsapi/resteasy-jsapi.iml deleted file mode 100644 index cbfebf0a890..00000000000 --- a/resteasy-jsapi/resteasy-jsapi.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-links/resteasy-links.iml b/resteasy-links/resteasy-links.iml deleted file mode 100644 index cc9a152f0a8..00000000000 --- a/resteasy-links/resteasy-links.iml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-spring/resteasy-spring.iml b/resteasy-spring/resteasy-spring.iml deleted file mode 100644 index fc13ab38b09..00000000000 --- a/resteasy-spring/resteasy-spring.iml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resteasy-test-data/resteasy-test-data.iml b/resteasy-test-data/resteasy-test-data.iml deleted file mode 100644 index f3497818870..00000000000 --- a/resteasy-test-data/resteasy-test-data.iml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/security/resteasy-crypto/resteasy-crypto.iml b/security/resteasy-crypto/resteasy-crypto.iml deleted file mode 100644 index 0854ef7b83b..00000000000 --- a/security/resteasy-crypto/resteasy-crypto.iml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/security/resteasy-oauth/resteasy-oauth.iml b/security/resteasy-oauth/resteasy-oauth.iml deleted file mode 100644 index ab7b55a1c0d..00000000000 --- a/security/resteasy-oauth/resteasy-oauth.iml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/security/security-pom.iml b/security/security-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/security/security-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/server-adapters/http-adapter-pom.iml b/server-adapters/http-adapter-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/server-adapters/http-adapter-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/server-adapters/resteasy-jdk-http/resteasy-jdk-http.iml b/server-adapters/resteasy-jdk-http/resteasy-jdk-http.iml deleted file mode 100644 index 74416f0edda..00000000000 --- a/server-adapters/resteasy-jdk-http/resteasy-jdk-http.iml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server-adapters/resteasy-netty/resteasy-netty.iml b/server-adapters/resteasy-netty/resteasy-netty.iml deleted file mode 100644 index 1d5a7c02865..00000000000 --- a/server-adapters/resteasy-netty/resteasy-netty.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tjws/tjws.iml b/tjws/tjws.iml deleted file mode 100644 index e929abd7371..00000000000 --- a/tjws/tjws.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/war-tests/application-test/test-application-war.iml b/war-tests/application-test/test-application-war.iml deleted file mode 100644 index f9a305dd4e1..00000000000 --- a/war-tests/application-test/test-application-war.iml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/war-tests/context-test/test-context-war.iml b/war-tests/context-test/test-context-war.iml deleted file mode 100644 index 7036c8c27ff..00000000000 --- a/war-tests/context-test/test-context-war.iml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/war-tests/encoding-test/test-encoding-war.iml b/war-tests/encoding-test/test-encoding-war.iml deleted file mode 100644 index be99f988758..00000000000 --- a/war-tests/encoding-test/test-encoding-war.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/war-tests/filter-test/test-filter-war.iml b/war-tests/filter-test/test-filter-war.iml deleted file mode 100644 index 36670ab0d6e..00000000000 --- a/war-tests/filter-test/test-filter-war.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/war-tests/oauth-servlet-test/test-oauth-servlet-war.iml b/war-tests/oauth-servlet-test/test-oauth-servlet-war.iml deleted file mode 100644 index 3b46060ab56..00000000000 --- a/war-tests/oauth-servlet-test/test-oauth-servlet-war.iml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/war-tests/war-tests-pom.iml b/war-tests/war-tests-pom.iml deleted file mode 100644 index 9f7b48b1d51..00000000000 --- a/war-tests/war-tests-pom.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - From 458d9b2f40b730638d39a2adc50f7a4125ee7c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Saka=C5=99?= Date: Wed, 19 Mar 2014 11:13:19 +0100 Subject: [PATCH 9/9] [RESTEASY-736] fix test for EAP 6.2 --- .../resteasy/resteasy736/TestResource.java | 20 ++++-- .../test/resteasy736/AsyncTimeoutTest.java | 62 ++----------------- .../resteasy736/AsyncTimeoutTestCase.java | 32 ++++++++++ .../resteasy736/DefaultAsyncTimeoutTest.java | 42 +++++++++++++ 4 files changed, 92 insertions(+), 64 deletions(-) create mode 100644 arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTestCase.java create mode 100644 arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/DefaultAsyncTimeoutTest.java diff --git a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/resteasy736/TestResource.java b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/resteasy736/TestResource.java index 55e9f8f96ee..997802ad22f 100644 --- a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/resteasy736/TestResource.java +++ b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/resteasy736/TestResource.java @@ -31,11 +31,11 @@ public void run() { try { - System.out.println("TestResource: async thread started"); + System.out.println("TestResource test async thread started, timeout 5000, sleep 10000"); Thread.sleep(10000); Response jaxrs = Response.ok("test").type(MediaType.TEXT_PLAIN).build(); response.setResponse(jaxrs); - System.out.println("TestResource: async thread finished"); + System.out.println("TestResource test async thread finished"); } catch (Exception e) { @@ -45,7 +45,7 @@ public void run() }; t.start(); } - + @GET @Path("default") public void defalt(final @Suspend AsynchronousResponse response) @@ -57,11 +57,12 @@ public void run() { try { - System.out.println("TestResource: async thread started"); - Thread.sleep(35000); // Jetty async timeout defaults to 30000. + int millis = getDefaultTimeout() + 5000; + System.out.println("TestResource default async thread started, timeout default, sleep " + millis); + Thread.sleep(millis); Response jaxrs = Response.ok("test").type(MediaType.TEXT_PLAIN).build(); response.setResponse(jaxrs); - System.out.println("TestResource: async thread finished"); + System.out.println("TestResource default async thread finished"); } catch (Exception e) { @@ -71,4 +72,11 @@ public void run() }; t.start(); } + + public static int getDefaultTimeout() { + // Jetty async timeout defaults to 30000 + // Tomcat async timeout defaults to 10000 + // JBoss async timeout defaults to 60000 + return 60000; + } } diff --git a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTest.java b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTest.java index f81a0d18423..ab19640eeed 100644 --- a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTest.java +++ b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTest.java @@ -2,40 +2,12 @@ import static org.junit.Assert.*; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit.Arquillian; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.resteasy736.TestApplication; -import org.jboss.resteasy.resteasy736.TestResource; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; -import org.junit.runner.RunWith; -/** - * - * @author Ron Sigal - * @version $Revision: 1.1 $ - * - * Copyright Aug 3, 2012 - */ -@RunWith(Arquillian.class) -@RunAsClient -public class AsyncTimeoutTest +public class AsyncTimeoutTest extends AsyncTimeoutTestCase { - @Deployment - public static Archive createTestArchive() - { - WebArchive war = ShrinkWrap.create(WebArchive.class, "RESTEASY-736.war") - .addClasses(TestApplication.class, TestResource.class) - .addClasses(AsyncTimeoutTest.class) - .addAsWebInfResource("web.xml"); - System.out.println(war.toString(true)); - return war; - } @Test public void testAsynchTimeout() throws Exception @@ -54,42 +26,16 @@ public void testAsynchTimeout() throws Exception } finally { + request.clear(); System.out.println("finish: " + System.currentTimeMillis()); long elapsed = System.currentTimeMillis() - start; System.out.println("elapsed: " + elapsed + " ms");; System.out.println("status: " + response.getStatus()); assertTrue(response != null); System.out.println("response: " + response.getEntity()); - assertTrue(response.getStatus() == 503); - assertTrue(elapsed < 10000); + assertEquals(503, response.getStatus()); + assertTrue("Expected response time < 10000, actual " + elapsed, elapsed < 10000 + 500); } } - @Test - public void testDefaultAsynchTimeout() throws Exception - { - ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-736/default/"); - long start = System.currentTimeMillis(); - System.out.println("start: " + start); - ClientResponse response = null; - try - { - response = request.get(String.class); - } - catch (Exception e) - { - System.out.println(e); - } - finally - { - System.out.println("finish: " + System.currentTimeMillis()); - long elapsed = System.currentTimeMillis() - start; - System.out.println("elapsed: " + elapsed + " ms");; - System.out.println("status: " + response.getStatus()); - assertTrue(response != null); - System.out.println("response: " + response.getEntity()); - assertTrue(response.getStatus() == 503); - assertTrue(elapsed < 35000); // Jetty async timeout defaults to 30000. - } - } } diff --git a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTestCase.java b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTestCase.java new file mode 100644 index 00000000000..18f1bf8b8ed --- /dev/null +++ b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/AsyncTimeoutTestCase.java @@ -0,0 +1,32 @@ +package org.jboss.resteasy.test.resteasy736; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.RunAsClient; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.resteasy.resteasy736.TestApplication; +import org.jboss.resteasy.resteasy736.TestResource; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.runner.RunWith; + +/** + * + * @author Ron Sigal + * @version $Revision: 1.1 $ + * + * Copyright Aug 3, 2012 + */ +@RunWith(Arquillian.class) +@RunAsClient +public abstract class AsyncTimeoutTestCase +{ + @Deployment + public static Archive createTestArchive() + { + return ShrinkWrap.create(WebArchive.class, "RESTEASY-736.war") + .addClasses(TestApplication.class, TestResource.class) + .addAsWebInfResource("web.xml"); + } + +} diff --git a/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/DefaultAsyncTimeoutTest.java b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/DefaultAsyncTimeoutTest.java new file mode 100644 index 00000000000..768579a22d3 --- /dev/null +++ b/arquillian/RESTEASY-736/src/test/java/org/jboss/resteasy/test/resteasy736/DefaultAsyncTimeoutTest.java @@ -0,0 +1,42 @@ +package org.jboss.resteasy.test.resteasy736; + +import static org.junit.Assert.*; + +import org.jboss.resteasy.client.ClientRequest; +import org.jboss.resteasy.client.ClientResponse; +import org.jboss.resteasy.resteasy736.TestResource; +import org.junit.Test; + +public class DefaultAsyncTimeoutTest extends AsyncTimeoutTestCase +{ + + @Test + public void testDefaultAsynchTimeout() throws Exception + { + ClientRequest request = new ClientRequest("http://localhost:8080/RESTEASY-736/default/"); + long start = System.currentTimeMillis(); + System.out.println("start: " + start); + ClientResponse response = null; + try + { + response = request.get(String.class); + } + catch (Exception e) + { + System.out.println(e); + } + finally + { + request.clear(); + System.out.println("finish: " + System.currentTimeMillis()); + long elapsed = System.currentTimeMillis() - start; + System.out.println("elapsed: " + elapsed + " ms");; + System.out.println("status: " + response.getStatus()); + assertTrue(response != null); + System.out.println("response: " + response.getEntity()); + assertEquals(503, response.getStatus()); + int max = TestResource.getDefaultTimeout() + 5000; + assertTrue("Expected response time < " + max + ", actual " + elapsed, elapsed < max); + } + } +}