openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1777496 - in /openwebbeans/meecrowave/trunk: ./ integration-tests/ integration-tests/app-groovy/ integration-tests/app-groovy/src/ integration-tests/app-groovy/src/main/ integration-tests/app-groovy/src/main/java/ integration-tests/app-gro...
Date Thu, 05 Jan 2017 19:07:58 GMT
Author: rmannibucau
Date: Thu Jan  5 19:07:57 2017
New Revision: 1777496

URL: http://svn.apache.org/viewvc?rev=1777496&view=rev
Log:
adding some tests to prevent regression in our groovy support

Added:
    openwebbeans/meecrowave/trunk/integration-tests/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/pom.xml
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/SimpleService.groovy
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/resources/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/SimpleServiceTest.groovy
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/
    openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/SimpleService2.groovy
    openwebbeans/meecrowave/trunk/integration-tests/pom.xml
Modified:
    openwebbeans/meecrowave/trunk/pom.xml

Added: openwebbeans/meecrowave/trunk/integration-tests/app-groovy/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/integration-tests/app-groovy/pom.xml?rev=1777496&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/integration-tests/app-groovy/pom.xml (added)
+++ openwebbeans/meecrowave/trunk/integration-tests/app-groovy/pom.xml Thu Jan  5 19:07:57
2017
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="
+            http://maven.apache.org/POM/4.0.0
+            http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>integration-tests</artifactId>
+    <groupId>org.apache.meecrowave</groupId>
+    <version>0.3.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>app-groovy</artifactId>
+  <name>Meecrowave :: Integration Tests :: Groovy</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy-all</artifactId>
+      <version>2.4.7</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.meecrowave</groupId>
+      <artifactId>meecrowave-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.5.1</version>
+        <configuration>
+          <compilerId>groovy-eclipse-compiler</compilerId>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-eclipse-compiler</artifactId>
+            <version>2.9.1-01</version>
+          </dependency>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-eclipse-batch</artifactId>
+            <version>2.3.7-01</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

Added: openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/SimpleService.groovy
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/SimpleService.groovy?rev=1777496&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/SimpleService.groovy
(added)
+++ openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/main/java/org/apache/groovy/SimpleService.groovy
Thu Jan  5 19:07:57 2017
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.groovy
+
+import javax.enterprise.context.ApplicationScoped
+import javax.ws.rs.GET
+import javax.ws.rs.Path
+
+@Path("simple")
+@ApplicationScoped
+class SimpleService {
+    @GET
+    get() {
+        "simple"
+    }
+}

Added: openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/SimpleServiceTest.groovy
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/SimpleServiceTest.groovy?rev=1777496&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/SimpleServiceTest.groovy
(added)
+++ openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/java/org/apache/groovy/SimpleServiceTest.groovy
Thu Jan  5 19:07:57 2017
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.groovy
+
+import org.apache.meecrowave.Meecrowave
+import org.junit.Test
+
+import javax.ws.rs.client.ClientBuilder
+
+import static javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE
+import static org.junit.Assert.assertEquals
+
+class SimpleServiceTest {
+    @Test
+    void groovyCp() {
+        def container = new Meecrowave(new Meecrowave.Builder().randomHttpPort()).bake()
+        try {
+            def client = ClientBuilder.newClient()
+            assertEquals("simple", client.target("http://localhost:" + container.configuration.httpPort
+ "/simple")
+                    .request(TEXT_PLAIN_TYPE)
+                    .get(String))
+            client.close()
+        } finally {
+            container.close()
+        }
+    }
+
+    @Test
+    void groovyLoader() {
+        def loader = new GroovyClassLoader()
+        loader.parseClass(new File("src/test/parsed/SimpleService2.groovy"))
+
+        def thread = Thread.currentThread()
+        def old = thread.contextClassLoader
+        thread.setContextClassLoader(loader)
+        def container = new Meecrowave(new Meecrowave.Builder().randomHttpPort()).bake()
+        try {
+            def client = ClientBuilder.newClient()
+            assertEquals("simple2", client.target("http://localhost:" + container.configuration.httpPort
+ "/simple2")
+                    .request(TEXT_PLAIN_TYPE)
+                    .get(String))
+            client.close()
+        } finally {
+            container.close()
+            loader.close()
+            thread.setContextClassLoader(old)
+        }
+    }
+}

Added: openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/SimpleService2.groovy
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/SimpleService2.groovy?rev=1777496&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/SimpleService2.groovy
(added)
+++ openwebbeans/meecrowave/trunk/integration-tests/app-groovy/src/test/parsed/SimpleService2.groovy
Thu Jan  5 19:07:57 2017
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import javax.enterprise.context.ApplicationScoped
+import javax.ws.rs.GET
+import javax.ws.rs.Path
+
+@Path("simple2")
+@ApplicationScoped
+class SimpleService2 {
+    @GET
+    get() {
+        "simple2"
+    }
+}

Added: openwebbeans/meecrowave/trunk/integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/integration-tests/pom.xml?rev=1777496&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/integration-tests/pom.xml (added)
+++ openwebbeans/meecrowave/trunk/integration-tests/pom.xml Thu Jan  5 19:07:57 2017
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="
+            http://maven.apache.org/POM/4.0.0
+            http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>meecrowave</artifactId>
+    <groupId>org.apache.meecrowave</groupId>
+    <version>0.3.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>integration-tests</artifactId>
+  <name>Meecrowave :: Integration Tests</name>
+  <packaging>pom</packaging>
+  <description>
+    For modules requiring custom classpaths.
+  </description>
+
+  <modules>
+    <module>app-groovy</module>
+  </modules>
+</project>

Modified: openwebbeans/meecrowave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/pom.xml?rev=1777496&r1=1777495&r2=1777496&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/pom.xml (original)
+++ openwebbeans/meecrowave/trunk/pom.xml Thu Jan  5 19:07:57 2017
@@ -68,6 +68,7 @@
     <module>meecrowave-jolokia</module>
     <module>meecrowave-doc</module>
     <module>meecrowave-jta</module>
+    <module>integration-tests</module>
   </modules>
 
   <build>



Mime
View raw message