felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r989508 - in /felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration: ConfigurationBindingTest.java ConfigurationTestBase.java
Date Thu, 26 Aug 2010 07:53:47 GMT
Author: fmeschbe
Date: Thu Aug 26 07:53:47 2010
New Revision: 989508

URL: http://svn.apache.org/viewvc?rev=989508&view=rev
Log:
Add some delay in the ConfigurationBindingTest to ensure newly created configurations are
not immediately distributed to starting bundles.
Add option to wait for the framework to start without timing out. This prevents test failures
on slow machines.

Modified:
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationTestBase.java

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java?rev=989508&r1=989507&r2=989508&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
(original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
Thu Aug 26 07:53:47 2010
@@ -292,6 +292,9 @@ public class ConfigurationBindingTest ex
         config.setBundleLocation( location );
         TestCase.assertEquals( location, config.getBundleLocation() );
 
+        // ensure configuration is settled before starting the bundle
+        delay();
+
         bundle.start();
 
         // give cm time for distribution
@@ -426,6 +429,9 @@ public class ConfigurationBindingTest ex
         config.setBundleLocation( location );
         TestCase.assertEquals( location, config.getBundleLocation() );
 
+        // ensure configuration is settled before starting the bundle
+        delay();
+
         // start the bundle
         bundle.start();
         delay();

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationTestBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationTestBase.java?rev=989508&r1=989507&r2=989508&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationTestBase.java
(original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationTestBase.java
Thu Aug 26 07:53:47 2010
@@ -22,6 +22,7 @@ package org.apache.felix.cm.integration;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.provision;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -123,7 +124,8 @@ public abstract class ConfigurationTestB
             provision(
                 CoreOptions.bundle( bundleFile.toURI().toString() ),
                 mavenBundle( "org.ops4j.pax.swissbox", "pax-swissbox-tinybundles", "1.0.0"
)
-             )
+             ),
+             waitForFrameworkStartup()
         );
         final Option vmOption = ( paxRunnerVmOption != null ) ? PaxRunnerOptions.vmOption(
paxRunnerVmOption ) : null;
         return OptionUtils.combine( base, vmOption );



Mime
View raw message