Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-11-26 15:41:30 +0000
committerKrzysztof Daniel2013-11-26 15:41:30 +0000
commitb776de6fdad40421ca9cd722994137137a643498 (patch)
treedfb0fe737622095de07cc792c3f8af32716cf2d6
parent1413f8a5f4b1b4876cbaa64a9d69141126b11ba8 (diff)
downloadrt.equinox.p2-b776de6fdad40421ca9cd722994137137a643498.tar.gz
rt.equinox.p2-b776de6fdad40421ca9cd722994137137a643498.tar.xz
rt.equinox.p2-b776de6fdad40421ca9cd722994137137a643498.zip
bug 422043: 7 ConfigurationTests failed in official build
Use canocical path when referring to update sites in the tests. Change-Id: If88d410ae5926ee78a958a9631d18e836513356b Signed-off-by: Krzysztof Daniel <kdaniel@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
index 319a67c8e..d28f56cbc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
@@ -11,6 +11,7 @@
package org.eclipse.equinox.p2.tests.reconciler.dropins;
import java.io.File;
+import java.io.IOException;
import java.util.Iterator;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -86,14 +87,14 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* Test discovering a site in a platform.xml file and installing the bundles from it.
* Then change the site to be disabled and then re-reconcile.
*/
- public void testSiteEnabled() {
+ public void testSiteEnabled() throws IOException {
assertInitialized();
System.out.println(">>> testSiteEnabled " + output);
File temp = getTempFolder();
System.out.println(" temp folder location = " + temp);
toRemove.add(temp);
Configuration configuration = getConfiguration();
- String siteLocation = new File(temp, "eclipse").toURI().toString();
+ String siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
System.out.println(" site location = " + siteLocation);
File source = getTestData("2.0", "testData/reconciler/ext.jar");
@@ -143,7 +144,7 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* a sub-element of the site. When the feature and its plug-ins are removed
* from the site we need to ensure the plug-ins are removed from the install.
*/
- public void test_247095() {
+ public void test_247095() throws IOException {
assertInitialized();
System.out.println(">>> test_247095 " + output);
Configuration configuration = getConfiguration();
@@ -151,7 +152,7 @@ public class ConfigurationTests extends AbstractReconcilerTest {
toRemove.add(temp);
System.out.println(" temp=" + temp);
String siteLocation = null;
- siteLocation = new File(temp, "eclipse").toURI().toString();
+ siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
// copy the data to the temp folder
File source = getTestData("1.0", "testData/reconciler/247095");
@@ -201,13 +202,13 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* Same but delete the files from disk. (other test cases doesn't delete the files... simulates
* the use of a shared bundle pool)
*/
- public void test_247095b() {
+ public void test_247095b() throws IOException {
assertInitialized();
Configuration configuration = getConfiguration();
File temp = getTempFolder();
toRemove.add(temp);
String siteLocation = null;
- siteLocation = new File(temp, "eclipse").toURI().toString();
+ siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
// copy the data to the temp folder
File source = getTestData("1.0", "testData/reconciler/247095");
@@ -261,13 +262,13 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* features, we were always adding the features to the excludes list and
* therefore they were never installed.
*/
- public void test_249607() {
+ public void test_249607() throws IOException {
assertInitialized();
Configuration configuration = getConfiguration();
File temp = getTempFolder();
toRemove.add(temp);
String siteLocation = null;
- siteLocation = new File(temp, "eclipse").toURI().toString();
+ siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
// copy the data to the temp folder
File source = getTestData("1.0", "testData/reconciler/247095");
@@ -302,12 +303,12 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* Add a site to the platform.xml, reconcile, ensure its contents are installed, remove the site,
* reconcile, ensure the contents are uninstalled.
*/
- public void test_249898() {
+ public void test_249898() throws IOException {
assertInitialized();
Configuration configuration = getConfiguration();
File temp = getTempFolder();
toRemove.add(temp);
- String siteLocation = new File(temp, "eclipse").toURI().toString();
+ String siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
// copy the data to the temp folder
File source = getTestData("1.0", "testData/reconciler/247095");
@@ -340,12 +341,12 @@ public class ConfigurationTests extends AbstractReconcilerTest {
/*
* Test extension locations that have both JAR'd bundles and directory-based bundles.
*/
- public void test_232094a() {
+ public void test_232094a() throws IOException {
assertInitialized();
internal_test_232094(getTestData("1.0", "testData/reconciler/ext.dir"));
}
- public void test_232094b() {
+ public void test_232094b() throws IOException {
assertInitialized();
internal_test_232094(getTestData("1.0", "testData/reconciler/ext.jar"));
}
@@ -355,14 +356,14 @@ public class ConfigurationTests extends AbstractReconcilerTest {
* by the user putting a .link file in the links/ folder. Then they delete the link file
* and the features and plug-ins should be uninstalled.
*/
- private void internal_test_232094(File source) {
+ private void internal_test_232094(File source) throws IOException {
File temp = getTempFolder();
toRemove.add(temp);
// copy the data to an extension location
copy("1.1", source, temp);
// create the file in the links/ folder
- createLinkFile("2.0", "myLink", temp.getAbsolutePath());
+ createLinkFile("2.0", "myLink", temp.getCanonicalFile().getAbsolutePath());
// reconcile
reconcile("3.0");

Back to the top