diff options
author | Thomas Watson | 2016-06-16 14:33:43 +0000 |
---|---|---|
committer | Thomas Watson | 2016-06-16 14:33:43 +0000 |
commit | e234ae5142ed330df84a5eae361f864aa5cb0c10 (patch) | |
tree | f65589c1e4e56daf503bb0ef1781b51f6f9fef5e /bundles/org.eclipse.osgi.tests | |
parent | 3841a41167128ab80ffe8f05bf793694f5c28400 (diff) | |
download | rt.equinox.framework-e234ae5142ed330df84a5eae361f864aa5cb0c10.tar.gz rt.equinox.framework-e234ae5142ed330df84a5eae361f864aa5cb0c10.tar.xz rt.equinox.framework-e234ae5142ed330df84a5eae361f864aa5cb0c10.zip |
Revert "Bug 449765 - Framework should provide a persistent UUID"
This reverts commit 3841a41167128ab80ffe8f05bf793694f5c28400.
Change-Id: I90c3d843d6593997f1ff38922a3662d2f4131509
Diffstat (limited to 'bundles/org.eclipse.osgi.tests')
-rwxr-xr-x[-rw-r--r--] | bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java index 9ad06a4e0..c1127c9a7 100644..100755 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java @@ -22,7 +22,6 @@ import javax.net.SocketFactory; import junit.framework.Test; import junit.framework.TestSuite; import org.eclipse.core.runtime.adaptor.EclipseStarter; -import org.eclipse.osgi.container.namespaces.EquinoxPersistentUUIDNamespace; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.eclipse.osgi.internal.location.EquinoxLocations; import org.eclipse.osgi.launch.Equinox; @@ -1332,7 +1331,7 @@ public class SystemBundleTests extends AbstractBundleTests { System.getProperties().remove("test.url"); } - public void testOSGiUUID() { + public void testUUID() { File config1 = OSGiTestsActivator.getContext().getDataFile(getName() + "_1"); //$NON-NLS-1$ Map configuration1 = new HashMap(); configuration1.put(Constants.FRAMEWORK_STORAGE, config1.getAbsolutePath()); @@ -1392,66 +1391,6 @@ public class SystemBundleTests extends AbstractBundleTests { } } - public void testPersistentUUID() { - File config1 = OSGiTestsActivator.getContext().getDataFile(getName() + "_1"); //$NON-NLS-1$ - Map configuration1 = new HashMap(); - configuration1.put(Constants.FRAMEWORK_STORAGE, config1.getAbsolutePath()); - Equinox equinox1 = new Equinox(configuration1); - try { - equinox1.init(); - } catch (BundleException e) { - fail("Failed init", e); - } - String uuid1_1 = equinox1.getBundleContext().getProperty(EquinoxPersistentUUIDNamespace.PERSISTENT_UUID_NAMESPACE); - verifyUUID(uuid1_1); - - File config2 = OSGiTestsActivator.getContext().getDataFile(getName() + "_2"); //$NON-NLS-1$ - Map configuration2 = new HashMap(); - configuration2.put(Constants.FRAMEWORK_STORAGE, config2.getAbsolutePath()); - Equinox equinox2 = new Equinox(configuration1); - try { - equinox2.init(); - } catch (BundleException e) { - fail("Failed init", e); - } - String uuid2_1 = equinox2.getBundleContext().getProperty(EquinoxPersistentUUIDNamespace.PERSISTENT_UUID_NAMESPACE); - verifyUUID(uuid2_1); - - assertFalse("UUIDs are the same: " + uuid1_1, uuid1_1.equals(uuid2_1)); - - try { - equinox1.stop(); - equinox2.stop(); - equinox1.waitForStop(1000); - equinox2.waitForStop(1000); - equinox1.init(); - equinox2.init(); - } catch (BundleException e) { - fail("Failed to re-init frameworks.", e); - } catch (InterruptedException e) { - fail("Failed to stop frameworks.", e); - } - - String uuid1_2 = equinox1.getBundleContext().getProperty(EquinoxPersistentUUIDNamespace.PERSISTENT_UUID_NAMESPACE); - verifyUUID(uuid1_2); - String uuid2_2 = equinox2.getBundleContext().getProperty(EquinoxPersistentUUIDNamespace.PERSISTENT_UUID_NAMESPACE); - verifyUUID(uuid2_2); - assertEquals("UUIDs are not the same: ", uuid1_1, uuid1_2); - assertFalse("UUIDs are the same: " + uuid1_2, uuid1_2.equals(uuid2_2)); - assertEquals("UUIDs are not the same: ", uuid2_1, uuid2_2); - - try { - equinox1.stop(); - equinox2.stop(); - equinox1.waitForStop(1000); - equinox2.waitForStop(1000); - } catch (BundleException e) { - fail("Failed to re-init frameworks.", e); - } catch (InterruptedException e) { - fail("Failed to stop frameworks.", e); - } - } - private void verifyUUID(String uuid) { assertNotNull("Null uuid.", uuid); StringTokenizer st = new StringTokenizer(uuid, "-"); @@ -2331,7 +2270,6 @@ public class SystemBundleTests extends AbstractBundleTests { EquinoxConfiguration.PROP_OSGI_NL, // EquinoxConfiguration.PROP_STATE_SAVE_DELAY_INTERVAL, // EquinoxConfiguration.PROP_INIT_UUID, // - EquinoxPersistentUUIDNamespace.PERSISTENT_UUID_NAMESPACE, // "gosh.args", // EquinoxLocations.PROP_HOME_LOCATION_AREA, // EquinoxLocations.PROP_CONFIG_AREA, // |