diff options
author | Susan Franklin | 2009-10-01 00:34:29 +0000 |
---|---|---|
committer | Susan Franklin | 2009-10-01 00:34:29 +0000 |
commit | 64d931827a3fa4f78e1541582d5ade362affc942 (patch) | |
tree | 6321e285ee6cb64077247591e97318324f3751f6 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver | |
parent | 4e07fcf78428d5bdd4b6015a9584b3ef58957114 (diff) | |
download | rt.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/testserver')
2 files changed, 18 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java index eff752e4d..ce14e91a7 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/AbstractTestServerClientCase.java @@ -118,6 +118,10 @@ public class AbstractTestServerClientCase extends TestCase { public Certificate[] showCertificates(Certificate[][] certificates) { return null; } + + public boolean promptForUnsignedContent(String[] details) { + return true; + } } /** @@ -141,6 +145,11 @@ public class AbstractTestServerClientCase extends TestCase { public Certificate[] showCertificates(Certificate[][] certificates) { return null; } + + public boolean promptForUnsignedContent(String[] details) { + return true; + } + } } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java index 589d76f03..a7ce95417 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java @@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.tests.testserver.helper; import java.io.IOException; import java.net.ServerSocket; import java.security.cert.Certificate; +import java.util.Hashtable; import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI; import org.eclipse.equinox.p2.tests.TestActivator; import org.osgi.framework.*; @@ -90,8 +91,11 @@ public class TestServerController { throw new IllegalStateException("Unable to start bundle " + BUNDLE_EQUINOX_HTTP); if (!startTransient(pkgAdmin, BUNDLE_TESTSERVER)) throw new IllegalStateException("Unable to start bundle " + BUNDLE_TESTSERVER); + // We must ensure that our IServiceUI service wins because the SDK registers one declaratively + Hashtable properties = new Hashtable(1); + properties.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE)); - certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new DelegatingAuthService(), null); + certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new DelegatingAuthService(), properties); setUpCounter = 1; } @@ -156,5 +160,9 @@ public class TestServerController { return null; } + public boolean promptForUnsignedContent(String[] details) { + return true; + } + } }
\ No newline at end of file |