Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3f42e49cc..d4b9e8a15 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 0d0eba503..e4da4759a 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";

Back to the top