diff --git a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF index 0be133d9be..20e4989a4d 100644 --- a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF @@ -23,7 +23,7 @@ Export-Package: org.eclipse.equinox.p2.tests;version="2.0.0", Require-Bundle: org.eclipse.equinox.frameworkadmin, org.eclipse.equinox.common, org.eclipse.core.tests.harness;bundle-version="3.4.0", - org.eclipse.core.runtime;bundle-version="3.29.0", + org.eclipse.core.runtime;bundle-version="3.30.0", org.eclipse.equinox.p2.publisher;bundle-version="1.0.0", org.eclipse.equinox.frameworkadmin.test;bundle-version="1.0.0", org.junit;bundle-version="4.8.0", diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedInstallTestsProfileSpoofEnabledConfigured.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedInstallTestsProfileSpoofEnabledConfigured.java index dcd61d1d5c..c5321e0c91 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedInstallTestsProfileSpoofEnabledConfigured.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedInstallTestsProfileSpoofEnabledConfigured.java @@ -19,8 +19,6 @@ import java.io.IOException; import java.io.InputStream; import java.util.Properties; -import junit.framework.Test; -import junit.framework.TestSuite; import org.eclipse.core.runtime.Platform; import org.eclipse.equinox.internal.p2.updatesite.Activator; import org.eclipse.equinox.p2.tests.sharedinstall.AbstractSharedInstallTest; @@ -29,15 +27,6 @@ public class SharedInstallTestsProfileSpoofEnabledConfigured extends SharedInsta private File extensions; - public static Test suite() { - TestSuite suite = new ReconcilerTestSuite(); - suite.setName(SharedInstallTestsProfileSpoofEnabledConfigured.class.getName()); - suite.addTest(new SharedInstallTestsProfileSpoofEnabledConfigured("testBasicStartup")); - suite.addTest(new SharedInstallTestsProfileSpoofEnabledConfigured("testReadOnlyDropinsStartup")); - suite.addTest(new SharedInstallTestsProfileSpoofEnabledConfigured("testUserDropinsStartup")); - return suite; - } - /* * Constructor for the class. */ @@ -98,18 +87,18 @@ public void testBasicStartup() throws IOException { try { File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); - assertFalse("0.1", userBundlesInfo.exists()); - assertFalse("0.2", userConfigIni.exists()); - reconcileReadOnly("0.21", extensions); - assertFalse("0.3", userBundlesInfo.exists()); - assertTrue("0.4", userConfigIni.exists()); + assertFalse(userBundlesInfo.exists()); + assertFalse(userConfigIni.exists()); + reconcileReadOnly("", extensions); + assertFalse(userBundlesInfo.exists()); + assertTrue(userConfigIni.exists()); Properties props = new Properties(); try (InputStream is = new BufferedInputStream(new FileInputStream(userConfigIni))) { props.load(is); } - assertTrue("0.5", props.containsKey("osgi.sharedConfiguration.area")); - assertTrue("0.6", props.size() == 1); + assertTrue(props.containsKey("osgi.sharedConfiguration.area")); + assertEquals(1, props.size()); } finally { cleanupReadOnlyInstall(); } @@ -117,7 +106,7 @@ public void testBasicStartup() throws IOException { @Override public void testReadOnlyDropinsStartup() throws IOException { - if (Platform.getOS().equals(Platform.OS_MACOSX)) + if (Platform.OS.isMac()) return; assertInitialized(); @@ -128,13 +117,13 @@ public void testReadOnlyDropinsStartup() throws IOException { try { File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); - assertFalse("0.1", userBundlesInfo.exists()); - assertFalse("0.2", userConfigIni.exists()); + assertFalse(userBundlesInfo.exists()); + assertFalse(userConfigIni.exists()); reconcileReadOnly("0.21", extensions); - assertTrue("0.3", userBundlesInfo.exists()); - assertTrue("0.4", userConfigIni.exists()); + assertTrue(userBundlesInfo.exists()); + assertTrue(userConfigIni.exists()); assertTrue(isInBundlesInfo(userBundlesInfo, "myBundle", null)); assertTrue(isInBundlesInfo(userBundlesInfo, "zzz", null)); @@ -142,7 +131,7 @@ public void testReadOnlyDropinsStartup() throws IOException { // remove the bundle from the dropins and reconcile setReadOnly(readOnlyBase, false); AbstractSharedInstallTest.removeReallyReadOnly(readOnlyBase); - assertTrue("0.7", readOnlyBase.canWrite()); + assertTrue(readOnlyBase.canWrite()); remove("1.0", "dropins", "myBundle_1.0.0.jar"); setReadOnly(readOnlyBase, true); AbstractSharedInstallTest.reallyReadOnly(readOnlyBase); @@ -164,7 +153,7 @@ public void testReadOnlyDropinsStartup() throws IOException { // new, up-to-date bundles.info setReadOnly(readOnlyBase, false); AbstractSharedInstallTest.removeReallyReadOnly(readOnlyBase); - assertTrue("0.7", readOnlyBase.canWrite()); + assertTrue(readOnlyBase.canWrite()); add("0.211", "dropins", jar); setReadOnly(readOnlyBase, true); AbstractSharedInstallTest.reallyReadOnly(readOnlyBase); @@ -183,7 +172,7 @@ public void testReadOnlyDropinsStartup() throws IOException { @Override public void testUserDropinsStartup() throws IOException { - if (Platform.getOS().equals(Platform.OS_MACOSX)) + if (Platform.OS.isMac()) return; assertInitialized(); @@ -198,13 +187,13 @@ public void testUserDropinsStartup() throws IOException { File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); - assertFalse("0.1", userBundlesInfo.exists()); - assertFalse("0.2", userConfigIni.exists()); + assertFalse(userBundlesInfo.exists()); + assertFalse(userConfigIni.exists()); reconcileReadOnly("0.21", extensions); - assertTrue("0.3", userBundlesInfo.exists()); - assertTrue("0.4", userConfigIni.exists()); + assertTrue(userBundlesInfo.exists()); + assertTrue(userConfigIni.exists()); assertTrue(isInBundlesInfo(userBundlesInfo, "myBundle", null)); assertTrue(isInBundlesInfo(userBundlesInfo, "zzz", null));