summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-02-11 20:28:52 (EST)
committerPascal Rapicault2013-02-11 20:28:52 (EST)
commit64ec030786710384e73167382a47bf5250f06847 (patch)
tree2501ae504246b36f3851cc65a7c751ac714780c3
parent7518c58aefe37fb25eb1defedfe855a3b24cf6df (diff)
downloadrt.equinox.p2-64ec030786710384e73167382a47bf5250f06847.zip
rt.equinox.p2-64ec030786710384e73167382a47bf5250f06847.tar.gz
rt.equinox.p2-64ec030786710384e73167382a47bf5250f06847.tar.bz2
Re-enable SharedConfigurationTest v20130212-012852I20130212-0800
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java9
2 files changed, 9 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
index 3f42e49..d4b9e8a 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2013 IBM Corporation 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Ericsson AB - ongoing development
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
@@ -42,7 +43,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(RemovingABundle.class);
suite.addTestSuite(RemovingAllBundles.class);
suite.addTestSuite(RenamingLauncherIni.class);
-// suite.addTestSuite(SharedConfigurationTest.class);
+ suite.addTestSuite(SharedConfigurationTest.class);
suite.addTestSuite(SimpleConfiguratorComingAndGoing.class);
suite.addTestSuite(SimpleConfiguratorTest.class);
suite.addTestSuite(TestEclipseDataArea.class);
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
index 0d0eba5..e4da475 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
@@ -26,6 +26,8 @@ import org.osgi.service.log.LogService;
public class SharedConfigurationTest extends AbstractFwkAdminTest {
+ private static final String BASE_CONFIG_INI_TIMESTAMP = ".baseConfigIniTimestamp";
+
public SharedConfigurationTest(String name) {
super(name);
}
@@ -136,6 +138,7 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
try {
manipulator.load();
} catch (IllegalStateException e) {
+ e.printStackTrace();
//TODO We ignore the framework JAR location not set exception
}
@@ -146,7 +149,7 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
manipulator.getConfigData().addBundle(configuratorBi);
manipulator.save(false);
- File baseTimestamp = new File(userConfigurationFolder, ".baseTimestamps");
+ File baseTimestamp = new File(userConfigurationFolder, BASE_CONFIG_INI_TIMESTAMP);
assertIsFile(baseTimestamp);
assertContent(baseTimestamp, Long.toString(new File(defaultConfigurationFolder, "config.ini").lastModified()));
}
@@ -167,8 +170,8 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
//setup the timestamp
Properties p = new Properties();
- p.setProperty("configIniTimestamp", Long.toString(new File(defaultConfigurationFolder, "config.ini").lastModified()));
- saveProperties(new File(userConfigurationFolder, ".baseTimestamps"), p);
+ p.setProperty("configIniTimestamp", Long.toString(new File(defaultConfigurationFolder, "config.ini").lastModified() - 10)); //Here we write an outdated timestamp to mimic the fact that the base has changed
+ saveProperties(new File(userConfigurationFolder, BASE_CONFIG_INI_TIMESTAMP), p);
String launcherName = "foo";