Author: bdelacretaz
Date: Fri Oct  9 12:11:15 2009
New Revision: 823524

URL: http://svn.apache.org/viewvc?rev=823524&view=rev
Log:
SLING-1078 - take framework refresh events into account

Modified:
    
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/BundleSnapshotUpdateTest.java

Modified: 
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/BundleSnapshotUpdateTest.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/BundleSnapshotUpdateTest.java?rev=823524&r1=823523&r2=823524&view=diff
==============================================================================
--- 
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/BundleSnapshotUpdateTest.java
 (original)
+++ 
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/osgi/installer/it/BundleSnapshotUpdateTest.java
 Fri Oct  9 12:11:15 2009
@@ -108,7 +108,7 @@
         final long nOps = 
installer.getCounters()[OsgiInstaller.OSGI_TASKS_COUNTER];
         installer.addResource(getInstallableResource(
                 getTestBundle(BUNDLE_BASE_NAME + "-snap.jar"), "digest1"));
-        waitForInstallerAction(OsgiInstaller.INSTALLER_CYCLES_COUNTER, 1);
+        waitForInstallerAction(OsgiInstaller.INSTALLER_CYCLES_COUNTER, 3);
         assertEquals("Updating snapshot bundle with same digest must not 
generate any OSGi tasks",
                 nOps, 
installer.getCounters()[OsgiInstaller.OSGI_TASKS_COUNTER]);
         
@@ -116,10 +116,11 @@
         resetCounters();
         installer.addResource(getInstallableResource(
                 getTestBundle(BUNDLE_BASE_NAME + "-snap.jar"), "digest2"));
-        // update also generates a start task, as the bundle was started before
-        waitForInstallerAction(OsgiInstaller.OSGI_TASKS_COUNTER, 2);
+        // update also generates a start task, as the bundle was started 
before, and a framework refresh
+        waitForInstallerAction(OsgiInstaller.OSGI_TASKS_COUNTER, 3);
         
         // And no more OSGi tasks after that
+        waitForInstallerAction(OsgiInstaller.INSTALLER_CYCLES_COUNTER, 3);
         assertNoOsgiTasks("At end of test");
     }
 


Reply via email to