You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2013/07/04 10:52:28 UTC
svn commit: r1499685 -
/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
Author: cziegeler
Date: Thu Jul 4 08:52:28 2013
New Revision: 1499685
URL: http://svn.apache.org/r1499685
Log:
SLING-2932 : Wasted work in BundleEventListener.assertNoBundleEvents() . Apply patch from Adrian Nistor
Modified:
sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
Modified: sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java?rev=1499685&r1=1499684&r2=1499685&view=diff
==============================================================================
--- sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java (original)
+++ sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java Thu Jul 4 08:52:28 2013
@@ -40,7 +40,6 @@ import javax.inject.Inject;
import org.apache.sling.installer.api.InstallableResource;
import org.apache.sling.installer.api.OsgiInstaller;
-import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -318,7 +317,7 @@ class OsgiInstallerTestBase implements F
final InstallableResource result = new MockInstallableResource("/" + configPid, copy(data), null, null, priority);
return new InstallableResource[] {result};
}
-
+
protected Dictionary<String, Object> copy(Dictionary<String, Object> data) {
final Dictionary<String, Object> copy = new Hashtable<String, Object>();
final Enumeration<String> keys = data.keys();
@@ -412,7 +411,7 @@ class OsgiInstallerTestBase implements F
)
);
}
-
+
protected Object startObservingBundleEvents() {
final BundleEventListener listener = new BundleEventListener();
this.bundleContext.addBundleListener(listener);
@@ -468,7 +467,7 @@ class OsgiInstallerTestBase implements F
this.bundleContext.removeBundleListener(listener);
}
}
-
+
protected boolean isPackageExported(Bundle b, String packageName) {
final BundleWiring wiring = b.adapt(BundleWiring.class);
assertNotNull("Expecting non-null BundleWiring for bundle " + b, wiring);
@@ -479,7 +478,7 @@ class OsgiInstallerTestBase implements F
}
return false;
}
-
+
public void logInstalledBundles() {
for(Bundle b : bundleContext.getBundles()) {
log(LogService.LOG_DEBUG, "Installed bundle: " + b.getSymbolicName());
@@ -561,6 +560,7 @@ class OsgiInstallerTestBase implements F
for(BundleEvent e : this.events ) {
if ( symbolicName.equals(e.symbolicName) ) {
found = true;
+ break;
}
}
}