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.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@997057 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
index 063a373..c777619 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FactoryConfigurationAdapterTest.java
@@ -49,7 +49,7 @@
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 @@
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() {
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
index ca57153..81ec4f1 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/SharingDependenciesWithMultipleServicesTest.java
@@ -55,7 +55,7 @@
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 @@
// 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);
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
index 5448241..aeaa63a 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/FactoryConfigurationAdapterAnnotationTest.java
@@ -54,7 +54,7 @@
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 @@
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.