cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r903308 - in /cxf/dosgi/trunk/systests2: ./ single-bundle/ single-bundle/src/ single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/ single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/common/ single-bundle/src/test/resour...
Date Tue, 26 Jan 2010 16:30:09 GMT
Author: davidb
Date: Tue Jan 26 16:30:08 2010
New Revision: 903308

URL: http://svn.apache.org/viewvc?rev=903308&view=rev
Log:
Moved system tests one directory down.

Added:
    cxf/dosgi/trunk/systests2/single-bundle/
    cxf/dosgi/trunk/systests2/single-bundle/src/
      - copied from r902847, cxf/dosgi/trunk/systests2/src/
    cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/
      - copied from r903283, cxf/dosgi/trunk/systests2/src/test/java/org/apache/cxf/dosgi/systests2/basic/
    cxf/dosgi/trunk/systests2/single-bundle/src/test/resources/
      - copied from r903283, cxf/dosgi/trunk/systests2/src/test/resources/
Removed:
    cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/common/
Modified:
    cxf/dosgi/trunk/systests2/pom.xml
    cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/TestImportService.java

Modified: cxf/dosgi/trunk/systests2/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/pom.xml?rev=903308&r1=903307&r2=903308&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/pom.xml (original)
+++ cxf/dosgi/trunk/systests2/pom.xml Tue Jan 26 16:30:08 2010
@@ -16,111 +16,12 @@
     <groupId>org.apache.cxf.dosgi.systests</groupId>
     <artifactId>cxf-dosgi-ri-systests2</artifactId>
     <version>1.2-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>pom</packaging>
 
     <name>Distributed OSGi System Tests 2</name>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam</artifactId>
-            <version>1.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-junit</artifactId>
-            <version>1.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-default</artifactId>
-            <version>1.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.swissbox</groupId>
-            <artifactId>pax-swissbox-tinybundles</artifactId>
-            <version>1.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <version>4.1.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-            <version>4.1.0</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.dosgi</groupId>
-            <artifactId>cxf-dosgi-ri-singlebundle-distribution</artifactId>
-            <version>${pom.version}</version>
-            <scope>test</scope>
-            <!-- can we avoid transitive dependencies here? -->
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.dosgi.samples</groupId>
-            <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
-            <version>${pom.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.dosgi.samples</groupId>
-            <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
-            <version>${pom.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency> 
-    </dependencies>
-
-    <!-- <modules>
-        <module>systest-greeter-client</module>
-    </modules> -->
-
-    <build>
-        <plugins>
-            <!-- use pax exam maven plugin -->
-
-            <!--
-            Note: settings and dependencies for the final osgi runtime (TESTS) are just used
in TestCases
-            that annotated with this:
-            @RunWith( MavenConfiguredJUnit4TestRunner.class )
-
-            All other testcases will use their own settings/provisioning inside @Configure
Methods.
-            -->
-            <plugin>
-                <groupId>org.ops4j.pax.exam</groupId>
-                <artifactId>maven-paxexam-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-config</id>
-                        <goals>
-                            <goal>generate-config</goal>
-                            <goal>generate-depends-file</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <options>
-                        <platform>equinox</platform>
-                        <profiles>log</profiles>
-                    </options>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+    <modules>
+        <module>single-bundle</module>
+    </modules>
 </project>
 

Modified: cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/TestImportService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/TestImportService.java?rev=903308&r1=903283&r2=903308&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/TestImportService.java
(original)
+++ cxf/dosgi/trunk/systests2/single-bundle/src/test/java/org/apache/cxf/dosgi/systests2/basic/TestImportService.java
Tue Jan 26 16:30:08 2010
@@ -67,20 +67,18 @@
         try {
             Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
             server = factory.create();
+        
+            Hashtable<String, Object> props = new Hashtable<String, Object>();
+            props.put("testName", "test1");
+            bundleContext.registerService(Object.class.getName(), new Object(), props);
+    
+            // Wait for the service tracker in the test bundle to register a service with
the test result
+            ServiceReference ref = waitService(String.class.getName(), "(testResult=test1)");
+            Assert.assertEquals("HiOSGi", ref.getProperty("result"));
         } finally {
+            server.stop(); 
             Thread.currentThread().setContextClassLoader(cl);
         }
-        
-//        JOptionPane.showMessageDialog(null, factory.getAddress());
-        
-        Hashtable<String, Object> props = new Hashtable<String, Object>();
-        props.put("testName", "test1");
-        bundleContext.registerService(Object.class.getName(), new Object(), props);
-
-        // Wait for the service tracker in the test bundle to register a service with the
test result
-        ServiceReference ref = waitService(String.class.getName(), "(testResult=test1)");
-        Assert.assertEquals("HiOSGi", ref.getProperty("result"));
-        server.stop(); // in finally !!!
     }
     
     private ServiceReference waitService(String cls, String filter) throws Exception {  
     



Mime
View raw message