Author: pderop
Date: Tue Sep 14 19:45:08 2010
New Revision: 997057
URL: http://svn.apache.org/viewvc?rev=997057&view=rev
Log:
Use latest configadmin 1.2.8, which fixes a bug, where some CM update events
may be lost, and removed
the corresponding sleep work arounds accordingly.
Modified:
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
Modified:
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java?rev=997057&r1=997056&r2=997057&view=diff
==============================================================================
---
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
(original)
+++
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
Tue Sep 14 19:45:08 2010
@@ -49,7 +49,7 @@ public class FactoryConfigurationAdapter
return options(
provision(
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version("4.1.0"),
-
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").version("1.2.4"),
+
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()
)
);
@@ -143,16 +143,11 @@ public class FactoryConfigurationAdapter
Properties props = new Properties();
props.put(key, val);
try {
- // Avoid bug from FELIX-1545
- Thread.sleep(500);
m_conf.update(props);
}
catch (IOException e) {
Assert.fail("Could not update configuration: " +
e.getMessage());
}
- catch (InterruptedException e)
- {
- }
}
public void stop() {
Modified:
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java?rev=997057&r1=997056&r2=997057&view=diff
==============================================================================
---
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
(original)
+++
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
Tue Sep 14 19:45:08 2010
@@ -55,7 +55,7 @@ public class SharingDependenciesWithMult
provision(
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version("4.1.0"),
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.dependencymanager").versionAsInProject(),
-
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").version("1.2.4")
+
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").version("1.2.8")
)
);
}
@@ -97,14 +97,10 @@ public class SharingDependenciesWithMult
// add the first consumer, and wait until its updated() method is
invoked
m.add(consumer1);
e.waitForStep(2, 15000);
- // Avoid bug in CM (FELIX-1545), which may miss some updates
- sleep(200);
// add the second consumer, and wait until its updated() method is
invoked
m.add(consumer2);
e.waitForStep(3, 15000);
- // Avoid bug in CM (FELIX-1545), which may miss some updates
- sleep(200);
// break down the test again
m.remove(consumer2);
Modified:
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java?rev=997057&r1=997056&r2=997057&view=diff
==============================================================================
---
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
(original)
+++
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
Tue Sep 14 19:45:08 2010
@@ -54,7 +54,7 @@ public class FactoryConfigurationAdapter
systemProperty(DMLOG_PROPERTY).value( "true" ),
provision(
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version("4.1.0"),
-
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").version("1.2.4"),
+
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(),
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.dependencymanager.runtime").versionAsInProject()),
provision(
@@ -81,14 +81,10 @@ public class FactoryConfigurationAdapter
cf.update(new Hashtable() {{ put("foo", "bar"); }});
// Wait for the ServiceProvider activation.
m_ensure.waitForStep(2, 10000);
- // Avoid bug in CM (FELIX-1545), which may miss some updates
- sleep(200);
// Update conf
cf.update(new Hashtable() {{ put("foo", "bar2"); }});
// Wait for effective update
m_ensure.waitForStep(4, 10000);
- // Avoid bug in CM (FELIX-1545), which may miss some updates
- sleep(200);
// Remove configuration.
cf.delete();
// Check if ServiceProvider has been stopped.