Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2009-10-01 00:34:29 +0000
committerSusan Franklin2009-10-01 00:34:29 +0000
commit64d931827a3fa4f78e1541582d5ade362affc942 (patch)
tree6321e285ee6cb64077247591e97318324f3751f6 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine
parent4e07fcf78428d5bdd4b6015a9584b3ef58957114 (diff)
downloadrt.equinox.p2-64d931827a3fa4f78e1541582d5ade362affc942.tar.gz
rt.equinox.p2-64d931827a3fa4f78e1541582d5ade362affc942.tar.xz
rt.equinox.p2-64d931827a3fa4f78e1541582d5ade362affc942.zip
Bug 288855 - [ui] IServiceUI should be registered using ds rather than in the startup code
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
index d743d22ee..81ff48ca3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
@@ -13,10 +13,10 @@ package org.eclipse.equinox.p2.tests.engine;
import java.io.File;
import java.io.IOException;
import java.security.cert.Certificate;
+import java.util.Hashtable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.engine.EngineActivator;
import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUICheckUnsigned;
import org.eclipse.equinox.internal.provisional.p2.engine.CertificateChecker;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestData;
@@ -26,7 +26,7 @@ import org.osgi.framework.ServiceRegistration;
* Tests for {@link CertificateChecker}.
*/
public class CertificateCheckerTest extends AbstractProvisioningTest {
- class CertificateTestService implements IServiceUI, IServiceUICheckUnsigned {
+ class CertificateTestService implements IServiceUI {
public boolean unsignedReturnValue = true;
public boolean wasPrompted = false;
@@ -63,8 +63,12 @@ public class CertificateCheckerTest extends AbstractProvisioningTest {
}
assertTrue("1.0", unsigned != null);
assertTrue("1.0", unsigned.exists());
+ // We need to ensure the test service has a higher ranking than
+ // anything registered by the SDK via DS.
serviceUI = new CertificateTestService();
- serviceReg = EngineActivator.getContext().registerService(IServiceUI.class.getName(), serviceUI, null);
+ Hashtable properties = new Hashtable(1);
+ properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+ serviceReg = EngineActivator.getContext().registerService(IServiceUI.class.getName(), serviceUI, properties);
}
protected void tearDown() throws Exception {

Back to the top