SLING-1794 : ConfigInstallTest fails semi-randomly: Configuration is still present
authorCarsten Ziegeler <cziegeler@apache.org>
Fri, 9 Jan 2015 13:30:10 +0000 (13:30 +0000)
committerCarsten Ziegeler <cziegeler@apache.org>
Fri, 9 Jan 2015 13:30:10 +0000 (13:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1650522 13f79535-47bb-0310-9956-ffa450edef68

src/test/java/org/apache/sling/installer/it/ConfigInstallTest.java

index ae51ba6..570acf7 100644 (file)
@@ -454,9 +454,7 @@ public class ConfigInstallTest extends OsgiInstallerTestBase implements Configur
         final Dictionary<String, Object> cfgData = new Hashtable<String, Object>();
         cfgData.put("foo", "bar");
         final InstallableResource[] rsrc = getInstallableResource(cfgPid, cfgData);
-        installationEvents = 0;
         installer.updateResources(URL_SCHEME, rsrc, null);
-        waitForInstallationEvents(2);
         waitForConfiguration("Config must be installed before stopping ConfigurationAdmin",
                 cfgPid, true);
 
@@ -468,6 +466,7 @@ public class ConfigInstallTest extends OsgiInstallerTestBase implements Configur
         installationEvents = 0;
         installer.updateResources(URL_SCHEME, null, new String[] {rsrc[0].getId()});
         waitForInstallationEvents(2);
+
         configAdmin.start();
         waitForConfigAdmin(true);
         waitForConfiguration("Config must be removed once ConfigurationAdmin restarts",