Author: vhalbert(a)redhat.com
Date: 2009-12-10 17:54:31 -0500 (Thu, 10 Dec 2009)
New Revision: 1644
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSourceMgr.java
Log:
Teiid 781 - changes to support running from hudson
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java 2009-12-10
22:30:15 UTC (rev 1643)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java 2009-12-10
22:54:31 UTC (rev 1644)
@@ -5,6 +5,7 @@
import java.util.Properties;
import org.teiid.test.framework.datasource.DataSourceFactory;
+import org.teiid.test.framework.datasource.DataStore;
import org.teiid.test.framework.exception.TransactionRuntimeException;
import org.teiid.test.util.PropUtils;
@@ -152,6 +153,22 @@
return p;
}
+
+ /**
+ * In certain testcases, the data that being provided is already
+ * preconfigured and should not be touched by the {@link DataStore}
+ * processing.
+ *
+ * @return
+ */
+ public boolean isDataStoreDisabled() {
+ String disable_config = this.getProperty(
+ ConfigPropertyNames.DISABLE_DATASTORES);
+ if (disable_config != null) {
+ return true;
+ }
+ return false;
+ }
public Map<String, String> getModelAssignedDatabaseTypes() {
return this.modelAssignedDatabaseType;
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java 2009-12-10
22:30:15 UTC (rev 1643)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java 2009-12-10
22:54:31 UTC (rev 1644)
@@ -18,12 +18,13 @@
import org.teiid.adminapi.AdminOptions;
import org.teiid.adminapi.Model;
import org.teiid.adminapi.VDB;
-import org.teiid.test.framework.ConfigPropertyNames;
+import org.teiid.test.framework.ConfigPropertyLoader;
import org.teiid.test.framework.TestLogger;
import org.teiid.test.framework.ConfigPropertyNames.CONNECTION_STRATEGY_PROPS;
import org.teiid.test.framework.datasource.DataSource;
import org.teiid.test.framework.datasource.DataSourceFactory;
import org.teiid.test.framework.datasource.DataSourceMgr;
+import org.teiid.test.framework.datasource.DataStore;
import org.teiid.test.framework.exception.QueryTestFailedException;
import org.teiid.test.framework.exception.TransactionRuntimeException;
@@ -81,12 +82,8 @@
* @return
*/
public boolean isDataStoreDisabled() {
- String disable_config =
getEnvironment().getProperty(ConfigPropertyNames.DISABLE_DATASTORES, null);
- if (disable_config != null) {
- return true;
+ return ConfigPropertyLoader.getInstance().isDataStoreDisabled();
}
- return false;
- }
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSourceMgr.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSourceMgr.java 2009-12-10
22:30:15 UTC (rev 1643)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSourceMgr.java 2009-12-10
22:54:31 UTC (rev 1644)
@@ -103,6 +103,9 @@
}
private void loadDataSourceMappings() throws QueryTestFailedException {
+ if (ConfigPropertyLoader.getInstance().isDataStoreDisabled()) {
+ return;
+ }
String dsloc =
ConfigPropertyLoader.getInstance().getProperty(ConfigPropertyNames.OVERRIDE_DATASOURCES_LOC);
Show replies by date