You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2009/09/03 16:52:44 UTC
svn commit: r810983 -
/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java
Author: bdelacretaz
Date: Thu Sep 3 14:52:43 2009
New Revision: 810983
URL: http://svn.apache.org/viewvc?rev=810983&view=rev
Log:
SLING-1078 - more robust testing
Modified:
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java
Modified: sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java?rev=810983&r1=810982&r2=810983&view=diff
==============================================================================
--- sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java (original)
+++ sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/ConfigInstallTest.java Thu Sep 3 14:52:43 2009
@@ -167,7 +167,8 @@
final Configuration c = ca.getConfiguration(cfgPid);
c.update(cfgData);
waitForConfigValue("After manual installation", cfgPid, TIMEOUT, "foo", "bar");
- assertEquals("Expected one ConfigurationEvent after manual install", 1, events.size());
+ Condition cond = new Condition() { public boolean isTrue() { return events.size() == 1; }};
+ waitForCondition("Expected two ConfigurationEvents since beginning of test", TIMEOUT, cond);
long nOps = installer.getCounters()[OsgiInstaller.OSGI_TASKS_COUNTER];
installer.addResource(getInstallableResource(cfgPid, cfgData));
@@ -180,7 +181,7 @@
cfgData.put("foo", "changed");
installer.addResource(getInstallableResource(cfgPid, cfgData));
waitForConfigValue("After changing value", cfgPid, TIMEOUT, "foo", "changed");
- final Condition cond = new Condition() { public boolean isTrue() { return events.size() == 2; }};
+ cond = new Condition() { public boolean isTrue() { return events.size() == 2; }};
waitForCondition("Expected two ConfigurationEvents since beginning of test", TIMEOUT, cond);
}
}