Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-06-16 14:33:43 +0000
committerThomas Watson2016-06-16 14:33:43 +0000
commite234ae5142ed330df84a5eae361f864aa5cb0c10 (patch)
treef65589c1e4e56daf503bb0ef1781b51f6f9fef5e /bundles/org.eclipse.osgi.tests
parent3841a41167128ab80ffe8f05bf793694f5c28400 (diff)
downloadrt.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"
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.java64
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, //

Back to the top