Author: jpeterka
Date: 2010-10-20 05:26:18 -0400 (Wed, 20 Oct 2010)
New Revision: 25934
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
Log:
Loading default configuration slightly modified
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-10-20
09:13:46 UTC (rev 25933)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-10-20
09:26:18 UTC (rev 25934)
@@ -43,6 +43,8 @@
public static Properties multiProperties = new Properties();
public static TestConfiguration currentConfig;
static {
+ boolean loadDefault = true;
+
try {
// try to load from file first
String propFile = System.getProperty(SWTBOT_TEST_PROPERTIES_FILE,
@@ -55,6 +57,7 @@
.info("Loading exeternaly provided multi-configuration file '"
+ propMultiFile + "'");
multiProperties.load(new FileInputStream(propMultiFile));
+ loadDefault = false;
}
else {
throw new IOException(SWTBOT_TEST_PROPERTIES_MULTI_FILE + " "
@@ -67,6 +70,7 @@
.info("Loading exeternaly configuration file '"
+ propFile + "'");
multiProperties.put("Default", propFile);
+ loadDefault = false;
}
else {
throw new IOException(SWTBOT_TEST_PROPERTIES_FILE + " "
@@ -75,27 +79,27 @@
}
else {
log.info("No configuration property passed, using default");
- multiProperties.put(SWTBOT_TEST_PROPERTIES_FILE, "");
-
+ multiProperties.put(SWTBOT_TEST_PROPERTIES_FILE, "");
}
} catch (Exception ex) {
ex.printStackTrace();
}
- // load default config by default
- /*
- try {
- log.info(" * Loading default configuration first");
- currentConfig = new TestConfiguration("default", "");
-
- } catch (Exception e) {
- // log only message, nothing
- log.error(e.getMessage());
+
+ if (loadDefault) {
+ // load default config by default
+ try {
+ log.info(" * Loading default configuration first");
+ currentConfig = new TestConfiguration("default", "");
+
+ } catch (Exception e) {
+ // log only message, nothing
+ log.error(e.getMessage());
+ }
+ finally {
+ log.info(" * Defaults loaded");
+ }
}
- finally {
- log.info(" * Defaults loaded");
- }
- */
}
/**
Show replies by date