summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-02-12 11:13:35 (EST)
committerPascal Rapicault2013-02-12 11:13:35 (EST)
commit7d5e191324952de080b7301c9c385906a6480e62 (patch)
tree4c4a89f1ba917535cd9ba0fb7847b58ac358527a
parent64ec030786710384e73167382a47bf5250f06847 (diff)
downloadrt.equinox.p2-7d5e191324952de080b7301c9c385906a6480e62.zip
rt.equinox.p2-7d5e191324952de080b7301c9c385906a6480e62.tar.gz
rt.equinox.p2-7d5e191324952de080b7301c9c385906a6480e62.tar.bz2
Copy input files to avoid failures.
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
index 6fc4480..120acfc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
@@ -1,10 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat, Inc. and others. All rights reserved. This
+ * Copyright (c) 2012,2013 Red Hat, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
- * Contributors: Red Hat, Inc. - initial API and implementation
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ * Ericsson AB - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.tests.simpleconfigurator;
@@ -26,9 +28,17 @@ public class SimpleConfiguratorTest extends AbstractProvisioningTest {
public void setUp() throws Exception {
relativeURL = new URL("file://bundles.info");
- userConfiguration = getTestData("userConfiguration", "testData/simpleconfigurator/user");
+ File tmp = getTempFolder();
+ final String USER_PATH = "testData/simpleconfigurator/user";
+ userConfiguration = new File(tmp, USER_PATH);
+ copy("copyUserConfiguration", getTestData("userConfiguration", USER_PATH), userConfiguration);
+
+ final String MASTER_PATH = "testData/simpleconfigurator/master";
+ masterConfguration = new File(tmp, MASTER_PATH);
+ copy("copymasterConfiguration", getTestData("masterConfiguration", MASTER_PATH), masterConfguration);
+
sharedConfiguration[0] = userConfiguration.toURL();
- masterConfguration = getTestData("userConfiguration", "testData/simpleconfigurator/master");
+
sharedConfiguration[1] = masterConfguration.toURL();
localConfiguration[0] = sharedConfiguration[1];
configurator = getSimpleConfigurator();
@@ -48,10 +58,7 @@ public class SimpleConfiguratorTest extends AbstractProvisioningTest {
@Override
protected void tearDown() throws Exception {
System.setProperty(SimpleConfiguratorImpl.PROP_IGNORE_USER_CONFIGURATION, "false");
- File f = new File(userConfiguration.getParent(), SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO);
- if (f.exists()) {
- f.delete();
- }
+
super.tearDown();
}