felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1531523 - in /felix/trunk/dependencymanager: test/src/test/java/org/apache/felix/dm/test/ test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/
Date Sat, 12 Oct 2013 09:32:07 GMT
Author: pderop
Date: Sat Oct 12 09:32:07 2013
New Revision: 1531523

URL: http://svn.apache.org/r1531523
Log:
pax exam 3.0.0 migration ...

Added:
    felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AdapterWithAspectTest.java
      - copied, changed from r1531247, felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AdapterWithAspectTest.java
    felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/FactoryConfigurationAdapterTest.java
      - copied, changed from r1531247, felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
Removed:
    felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AdapterWithAspectTest.java
    felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java

Copied: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AdapterWithAspectTest.java
(from r1531247, felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AdapterWithAspectTest.java)
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AdapterWithAspectTest.java?p2=felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AdapterWithAspectTest.java&p1=felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AdapterWithAspectTest.java&r1=1531247&r2=1531523&rev=1531523&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AdapterWithAspectTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AdapterWithAspectTest.java
Sat Oct 12 09:32:07 2013
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.dm.test;
+package org.apache.felix.dependencymanager.test2.integration.api;
 
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
@@ -32,22 +32,15 @@ import org.ops4j.pax.exam.junit.JUnit4Te
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
-@RunWith(JUnit4TestRunner.class)
-public class AdapterWithAspectTest extends Base {
-    @Configuration
-    public static Option[] configuration() {
-        return options(
-            provision(
-                mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version(Base.OSGI_SPEC_VERSION),
-                mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.dependencymanager").versionAsInProject()
-            ) // ,
-//          new VMOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-//          new TimeoutOption(0)
-        );
-    }
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
+
+@RunWith(PaxExam.class)
+public class AdapterWithAspectTest extends TestBase {
     
     @Test
-    public void testAdapterWithAspectMultipleTimes(BundleContext context) {
+    public void testAdapterWithAspectMultipleTimes() {
         // TODO this test is broken, it assumes that the order in which listeners are added
to the BundleContext will also
         // be the order in which they're invoked (which from a spec point of view is not
true)
         

Copied: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/FactoryConfigurationAdapterTest.java
(from r1531247, felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java)
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/FactoryConfigurationAdapterTest.java?p2=felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/FactoryConfigurationAdapterTest.java&p1=felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java&r1=1531247&r2=1531523&rev=1531523&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/FactoryConfigurationAdapterTest.java
Sat Oct 12 09:32:07 2013
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.dm.test;
+package org.apache.felix.dependencymanager.test2.integration.api;
 
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
@@ -24,6 +24,7 @@ import static org.ops4j.pax.exam.CoreOpt
 
 import java.io.IOException;
 import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
 
@@ -38,25 +39,17 @@ import org.ops4j.pax.exam.junit.Configur
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 
-@RunWith(JUnit4TestRunner.class)
-public class FactoryConfigurationAdapterTest extends Base
+@RunWith(PaxExam.class)
+public class FactoryConfigurationAdapterTest extends TestBase
 {
     private static Ensure m_ensure;
     
-    @Configuration
-    public static Option[] configuration() {
-        return options(
-            provision(
-                mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version(Base.OSGI_SPEC_VERSION),
-                mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").version("1.2.8"),
-                mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.dependencymanager").versionAsInProject()
-            )
-        );
-    }    
-    
     @Test
-    public void testFactoryConfigurationAdapter(BundleContext context) {
+    public void testFactoryConfigurationAdapter() {
         DependencyManager m = new DependencyManager(context);
         // helper class that ensures certain steps get executed in sequence
         m_ensure = new Ensure();
@@ -111,6 +104,7 @@ public class FactoryConfigurationAdapter
         // Remove the configuration
         m.remove(s1); // The stop method will remove the configuration
         m_ensure.waitForStep(16, 10000);
+        m.clear();
     }
 
     public static class ConfigurationCreator {
@@ -130,7 +124,7 @@ public class FactoryConfigurationAdapter
             try {
                 m_ensure.step(1);
                 m_conf = m_ca.createFactoryConfiguration(m_factoryPid, null);
-                Properties props = new Properties();
+                Hashtable props = new Hashtable();
                 props.put(m_key, m_value);
                 m_conf.update(props);
             }
@@ -140,7 +134,7 @@ public class FactoryConfigurationAdapter
         }
         
         public void update(String key, String val) {
-            Properties props = new Properties();
+            Hashtable props = new Hashtable();
             props.put(key, val);
             try {
                 m_conf.update(props);



Mime
View raw message