teiid SVN: r1380 - in trunk/test-integration/db/src/main/resources/datasources: db2_9 and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:11:31 -0400 (Fri, 18 Sep 2009)
New Revision: 1380
Added:
trunk/test-integration/db/src/main/resources/datasources/db2_9/
trunk/test-integration/db/src/main/resources/datasources/db2_9/connection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/db2_9/connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/db2_9/connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/db2_9/connection.properties 2009-09-18 19:11:31 UTC (rev 1380)
@@ -0,0 +1,17 @@
+db.type=db2
+driver=com.mysql.jdbc.Driver
+URL=jdbc:db2://ENGNTDBS12.mm.atl2.redhat.com:50000;databasename=db03
+User=repository_unit_test
+Password=mm
+
+servername=ENGNTDBS12.mm.atl2.redhat.com
+databasename=repository_unit_test
+portnumber=50000
+ds-jndiname=ENGNTDBS12_db2
+
+Immutable=true
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/db2_9/connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
teiid SVN: r1379 - trunk/test-integration/db/src/main/resources/datasources.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:11:06 -0400 (Fri, 18 Sep 2009)
New Revision: 1379
Modified:
trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
trunk/test-integration/db/src/main/resources/datasources/readme.txt
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Modified: trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 17:49:42 UTC (rev 1378)
+++ trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 19:11:06 UTC (rev 1379)
@@ -31,24 +31,36 @@
<datasourceconfig>
<datasourcetype name="nonxa">
- <datasource name="ds_mysql">
- <property name="dir">mysql</property>
+ <datasource name="ds_mysql_5">
+ <property name="dir">mysql_5</property>
<property name="connectortype">MySQL JDBC Connector</property>
</datasource>
- <datasource name="ds_oracle">
- <property name="dir">oracle</property>
+ <datasource name="ds_oracle_9">
+ <property name="dir">oracle_9</property>
<property name="connectortype">Oracle Connector</property>
</datasource>
- <datasource name="ds_sqlserver">
- <property name="dir">sqlserver</property>
+ <datasource name="ds_oracle_10">
+ <property name="dir">oracle_10</property>
+ <property name="connectortype">Oracle Connector</property>
+ </datasource>
+ <datasource name="ds_oracle_11">
+ <property name="dir">oracle_11</property>
+ <property name="connectortype">Oracle Connector</property>
+ </datasource>
+ <datasource name="ds_sqlserver_2005">
+ <property name="dir">sqlserver_2005</property>
<property name="connectortype">SQL Server Connector</property>
</datasource>
- <datasource name="ds_db2">
- <property name="dir">db2</property>
+ <datasource name="ds_sqlserver_2008">
+ <property name="dir">sqlserver_2008</property>
+ <property name="connectortype">SQL Server Connector</property>
+ </datasource>
+ <datasource name="ds_db2_9">
+ <property name="dir">db2_9</property>
<property name="connectortype">DB2 Connector</property>
</datasource>
- <datasource name="ds_postgres">
- <property name="dir">postgres</property>
+ <datasource name="ds_postgres_81">
+ <property name="dir">postgres_81</property>
<property name="connectortype">PostgreSQL JDBC Connector</property>
</datasource>
@@ -60,24 +72,36 @@
</datasourcetype>
<datasourcetype name="xa">
- <datasource name="ds_mysql_xa">
- <property name="dir">mysql</property>
+ <datasource name="ds_mysql_5_xa">
+ <property name="dir">mysql_5</property>
<property name="connectortype">MySQL JDBC XA Connector</property>
</datasource>
- <datasource name="ds_oracle_xa">
- <property name="dir">oracle</property>
+ <datasource name="ds_oracle_11_xa">
+ <property name="dir">oracle_11</property>
<property name="connectortype">Oracle XA Connector</property>
+ </datasource>
+ <datasource name="ds_oracle_10_xa">
+ <property name="dir">oracle_10</property>
+ <property name="connectortype">Oracle XA Connector</property>
+ </datasource>
+ <datasource name="ds_oracle_9_xa">
+ <property name="dir">oracle_9</property>
+ <property name="connectortype">Oracle XA Connector</property>
</datasource>
- <datasource name="ds_sqlserver">
- <property name="dir">sqlserver</property>
+ <datasource name="ds_sqlserver_2005">
+ <property name="dir">sqlserver_2005</property>
<property name="connectortype">SQL Server XA Connector</property>
</datasource>
- <datasource name="ds_db2_xa">
- <property name="dir">db2</property>
+ <datasource name="ds_sqlserver_2008">
+ <property name="dir">sqlserver_2008</property>
+ <property name="connectortype">SQL Server XA Connector</property>
+ </datasource>
+ <datasource name="ds_db2_9_xa">
+ <property name="dir">db2_9</property>
<property name="connectortype">DB2 XA Connector</property>
</datasource>
- <datasource name="ds_postgres_xa">
- <property name="dir">postgres</property>
+ <datasource name="ds_postgres_81_xa">
+ <property name="dir">postgres_81</property>
<property name="connectortype">PostgreSQL XA JDBC Connector</property>
</datasource>
Modified: trunk/test-integration/db/src/main/resources/datasources/readme.txt
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/readme.txt 2009-09-18 17:49:42 UTC (rev 1378)
+++ trunk/test-integration/db/src/main/resources/datasources/readme.txt 2009-09-18 19:11:06 UTC (rev 1379)
@@ -1,36 +1 @@
-the datasources directory is the location to define each database schema that can be used during the running of the tests
-a datasource here is defined as a unique connection to a specific schema
-
-To setup a datasource, do the following:
-
-1. open datasource_mapping.xml and find the datasource you would like to setup.
- Use the name of the directory ("dir") as the name of the folder to create for the datasource.
-1. create the directory (if it doesn't exist)
-2. create (or place) a connection.properties file in the newly created directory. See the
- example_connection.properties in the derby directory as a starting point.
-
-
-NOTE: The datasource_mapping.xml has groupings by datasource type. This is also a mechinism for creating groupings
-for special usecases. An example would be to do the following:
-
-- add 2 different groups to datasource_mapping.xml
-
- <datasourcetype name="TestIT">
- <datasource name="mysqlmyA">
- <property name="dir">mysql</property>
- <property name="connectortype">MySQL JDBC XA Connector</property>
- </datasource>
-
- <datasource name="oraclemyB">
- <property name="dir">oracle</property>
- <property name="connectortype">Oracle JDBC XA Connector</property>
- </datasource>
- </datasourcetype>
-
-
-- then, in the config properties file, map the models to each datasourcetype
-
-pm1=mysqlmyA
-pm2=oraclemyB
-
-This force the association between the model and datasource.
\ No newline at end of file
+These datasources are used for product testing
\ No newline at end of file
15 years, 3 months
teiid SVN: r1378 - in trunk/test-integration/db/src/test/java/org/teiid/test: testcases and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:49:42 -0400 (Fri, 18 Sep 2009)
New Revision: 1378
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/framework/AbstractQueryTransactionTest.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionTest.java
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/framework/AbstractQueryTransactionTest.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/framework/AbstractQueryTransactionTest.java 2009-09-18 17:49:14 UTC (rev 1377)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/framework/AbstractQueryTransactionTest.java 2009-09-18 17:49:42 UTC (rev 1378)
@@ -4,8 +4,12 @@
*/
package org.teiid.test.framework;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import java.io.BufferedReader;
+import java.io.IOException;
import java.sql.Statement;
import java.util.Properties;
@@ -50,6 +54,10 @@
assertNotNull(props);
this.executionProperties = props;
}
+ @Override
+ protected void compareResults(BufferedReader resultReader, BufferedReader expectedReader) throws IOException {
+ assertEquals(read(expectedReader, compareResultsCaseSensitive()) , read(resultReader, compareResultsCaseSensitive()));
+ }
@Override protected void assignExecutionProperties(Statement stmt) {
if (this.executionProperties != null) {
@@ -57,8 +65,7 @@
com.metamatrix.jdbc.api.Statement statement = (com.metamatrix.jdbc.api.Statement)stmt;
String txnautowrap = this.executionProperties.getProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP);
if (txnautowrap != null) {
- System.out.println("txnAutoWrap: " + txnautowrap);
- statement.setExecutionProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP, txnautowrap);
+ statement.setExecutionProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP, txnautowrap);
}
if (this.executionProperties.getProperty(ExecutionProperties.PROP_FETCH_SIZE) != null) {
@@ -73,6 +80,9 @@
return 1;
}
+ public boolean compareResultsCaseSensitive() {
+ return true;
+ }
@Override
public void setupDataSource() {
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionTest.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionTest.java 2009-09-18 17:49:14 UTC (rev 1377)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionTest.java 2009-09-18 17:49:42 UTC (rev 1378)
@@ -4,11 +4,13 @@
*/
package org.teiid.test.testcases;
+import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import org.teiid.test.framework.AbstractQueryTransactionTest;
import org.teiid.test.framework.QueryExecution;
+import org.teiid.test.framework.datasource.DataSource;
import com.metamatrix.jdbc.api.AbstractQueryTest;
@@ -187,7 +189,9 @@
public void validateTestCase() throws Exception {
// now verify the results
- AbstractQueryTest test = new QueryExecution(getSource("pm1"));
+ Connection ds = getSource("pm1");
+ System.out.println("Datasource: " + ds.getMetaData().getDatabaseProductName());
+ AbstractQueryTest test = new QueryExecution(ds);
test.execute("select * from g1 where e1 >= 100 and e1 < 112");
test.assertRowCount(12);
test.closeConnection();
@@ -283,6 +287,12 @@
public int getNumberRequiredDataSources(){
return 2;
}
+
+ // because different databases return "varchar" in all caps "VARCHAR"
+ // the comparison is being done in a noncasesensitive manner
+ public boolean compareResultsCaseSensitive() {
+ return false;
+ }
public void validateTestCase() throws Exception {
@@ -293,7 +303,10 @@
test.execute("select * from g2 where e1 >= 100 and e1 < 115");
test.assertRowCount(15);
test.execute("select distinct e2 from g1 where e1 > 100");
- test.assertResultsSetEquals(new String[] {"e2[VARCHAR]", "blah"});
+
+ // assertResultsSetEquals(this.internalResultSet., new String[] {"e2[varchar]", "blah"});
+
+ test.assertResultsSetEquals(new String[] {"e2[varchar]", "blah"});
test.closeConnection();
}
15 years, 3 months
teiid SVN: r1377 - in trunk/test-integration/db/src/main/java/org/teiid/test/framework: connection and 2 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:49:14 -0400 (Fri, 18 Sep 2009)
New Revision: 1377
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/TransactionContainer.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionQueryTest.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/connection/ConnectionStrategyFactory.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionUtil.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSource.java
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/transaction/TransactionFactory.java
Log:
Teiid 773 - organize integration test
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-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -16,29 +16,32 @@
* The default config file to use when #CONFIG_FILE system property isn't set
*/
private static final String DEFAULT_CONFIG_FILE_NAME="default-config.properties";
+
+ private static Properties props = null;
- public static Properties loadConfigurationProperties() {
- return loadConfiguration();
- }
-
- private static Properties loadConfiguration() {
+ public synchronized static void loadConfigurationProperties() {
String filename = System.getProperty(CONFIG_FILE);
if (filename == null) {
filename = DEFAULT_CONFIG_FILE_NAME;
}
- return loadProperties(filename);
-
- }
+ loadProperties(filename); }
+
+ public static String getProperty(String key) {
+ return getProperties().getProperty(key);
+ }
+
+ public synchronized static Properties getProperties() {
+ return props;
+ }
- private static Properties loadProperties(String filename) {
- Properties props = null;
+ private static void loadProperties(String filename) {
+ props = null;
try {
- InputStream in = ConnectionStrategyFactory.class.getResourceAsStream("/"+ filename);
+ InputStream in = ConfigPropertyLoader.class.getResourceAsStream("/"+ filename);
if (in != null) {
props = new Properties();
props.load(in);
- return props;
}
else {
throw new RuntimeException("Failed to load properties from file '"+filename+ "' configuration file");
@@ -49,12 +52,13 @@
}
public static void main(String[] args) {
- Properties props = ConfigPropertyLoader.loadConfigurationProperties();
- if (props == null || props.isEmpty()) {
+ ConfigPropertyLoader.loadConfigurationProperties();
+ Properties p = ConfigPropertyLoader.getProperties();
+ if (p == null || p.isEmpty()) {
throw new RuntimeException("Failed to load config properties file");
}
- System.out.println("Loaded Config Properties " + props.toString());
+ System.out.println("Loaded Config Properties " + p.toString());
}
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionContainer.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionContainer.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionContainer.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -19,7 +19,7 @@
public abstract class TransactionContainer {
- private boolean debug = true;
+ private boolean debug = false;
protected Properties props;
protected ConnectionStrategy connStrategy;
@@ -45,6 +45,24 @@
}
return rtn;
}
+
+
+ /**
+ * Returns true when what the test says it needs, in regards to types of data sources (i.e., mysql, oracle,etc),
+ * is found in the list of defined datatypes
+ * An example of returning false would be the following:
+ * <li>The defined datasources consist of oracle and sqlserver</li>
+ * <li>The test says it only supports mysql and oracle</li>
+ * Then the required datasources for the test are not available and therefore, the
+ * test cannot run.
+ *
+ * @return true if the required datasources are available
+ *
+ * @since
+ */
+ protected boolean hasRequiredSources() {
+ return true;
+ }
protected void before(TransactionQueryTest test){}
@@ -53,9 +71,13 @@
public void runTransaction(TransactionQueryTest test) {
if (turnOffTest(test.getNumberRequiredDataSources())) {
- detail("Transaction test: " + test.getTestName() + " will not be run");
+ detail("Turn Off Transaction test: " + test.getTestName() + ", doesn't have the number of required datasources");
return;
+ } else if (!hasRequiredSources()) {
+ detail("Turn Off Transaction test: " + test.getTestName() + ", required datasource types are not available");
+ return;
+
}
detail("Start transaction test: " + test.getTestName());
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionQueryTest.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionQueryTest.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionQueryTest.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -59,6 +59,9 @@
int getNumberRequiredDataSources();
+
+
+
/**
* Called by the {@link TransactionContainer} prior to testcase processing so that
* the datasource data can be setup for the specific testcase.
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-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -220,7 +220,7 @@
AdminOptions ao = new AdminOptions(AdminOptions.OnConflict.OVERWRITE);
ao.addOption(AdminOptions.BINDINGS_IGNORE_DECRYPT_ERROR);
- api.addConnectorBinding(ds.getName(), ds.getType(), ds.getProperties(), ao);
+ api.addConnectorBinding(ds.getName(), ds.getConnectorType(), ds.getProperties(), ao);
api.assignBindingToModel(ds.getName(), vdb.getName(), vdb.getVDBVersion(), m.getName());
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -4,13 +4,12 @@
*/
package org.teiid.test.framework.connection;
-import java.io.IOException;
-import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
+import org.teiid.test.framework.ConfigPropertyLoader;
import org.teiid.test.framework.exception.QueryTestFailedException;
import org.teiid.test.framework.exception.TransactionRuntimeException;
@@ -28,7 +27,6 @@
private static ConnectionStrategyFactory _instance = null;
private ConnectionStrategy strategy = null;
- private Properties config = null;
private static Map<String, ConnectionStrategy> sources = null;
@@ -39,9 +37,8 @@
public static synchronized ConnectionStrategyFactory getInstance() {
if (_instance == null) {
_instance = new ConnectionStrategyFactory();
- Properties p = _instance.loadConfiguration();
try {
- _instance.initialize(p);
+ _instance.initialize();
} catch (QueryTestFailedException e) {
// TODO Auto-generated catch block
throw new TransactionRuntimeException(e);
@@ -87,35 +84,17 @@
strategy.shutdown();
strategy = null;
- config = null;
-
+
}
- public Properties getConfiguration() {
- return this.config;
- }
-
public ConnectionStrategy getConnectionStrategy() {
return this.strategy;
}
- private Properties loadConfiguration() {
- init();
-
- String filename = System.getProperty(CONFIG_FILE);
- if (filename == null) {
- filename = DEFAULT_CONFIG_FILE_NAME;
- }
-
- return loadProperties(filename);
+ private void initialize() throws QueryTestFailedException {
+ init();
+ this.strategy = create(ConfigPropertyLoader.getProperties());
- }
-
- private void initialize(Properties props) throws QueryTestFailedException {
- this.config = props;
-
- this.strategy = create(props);
-
}
private ConnectionStrategy create(Properties props) throws QueryTestFailedException {
@@ -203,22 +182,22 @@
}
- private final Properties loadProperties(String filename) {
- Properties props = null;
- try {
- InputStream in = ConnectionStrategyFactory.class.getResourceAsStream("/"+filename);
- if (in != null) {
- props = new Properties();
- props.load(in);
- return props;
- }
- else {
- throw new RuntimeException("Failed to load properties from file '"+filename+ "' configuration file");
- }
- } catch (IOException e) {
- throw new RuntimeException("Error loading properties from file '"+filename+ "'" + e.getMessage());
- }
- }
+// private final Properties loadProperties(String filename) {
+// Properties props = null;
+// try {
+// InputStream in = ConnectionStrategyFactory.class.getResourceAsStream("/"+filename);
+// if (in != null) {
+// props = new Properties();
+// props.load(in);
+// return props;
+// }
+// else {
+// throw new RuntimeException("Failed to load properties from file '"+filename+ "' configuration file");
+// }
+// } catch (IOException e) {
+// throw new RuntimeException("Error loading properties from file '"+filename+ "'" + e.getMessage());
+// }
+// }
public static void main(String[] args) {
ConnectionStrategyFactory cf = ConnectionStrategyFactory.getInstance();
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionUtil.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionUtil.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionUtil.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -15,9 +15,7 @@
public static final Connection getSource(String identifier)
throws QueryTestFailedException {
if (identifier != null) {
- Properties props = ConfigPropertyLoader
- .loadConfigurationProperties();
- String mappedName = props.getProperty(identifier);
+ String mappedName = ConfigPropertyLoader.getProperty(identifier);
if (mappedName == null) {
throw new TransactionRuntimeException("Identifier mapping "
@@ -49,9 +47,7 @@
public static final XAConnection getXASource(String identifier)
throws QueryTestFailedException {
if (identifier != null) {
- Properties props = ConfigPropertyLoader
- .loadConfigurationProperties();
- String mappedName = props.getProperty(identifier);
+ String mappedName = ConfigPropertyLoader.getProperty(identifier);
if (mappedName == null) {
throw new TransactionRuntimeException("Identifier mapping "
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSource.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSource.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSource.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -1,20 +1,30 @@
package org.teiid.test.framework.datasource;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Properties;
public class DataSource {
+ public static final String CONNECTOR_TYPE="connectortype";
public static final String DIRECTORY="dir";
- public static final String CONNECTOR_TYPE="connectortype";
+ public static final String DB_TYPE="db.type";
+ static Map<String, String> dbtypeBitMaskMap = null;
+
+
private Properties props;
private String name;
private String group;
+ private String dbtype;
+ private int bitMask;
public DataSource(String name, String group, Properties properties) {
this.name = name;
this.group = group;
this.props = properties;
+ this.dbtype = this.props.getProperty(DB_TYPE);
+ this.setBitMask();
}
@@ -26,7 +36,7 @@
return group;
}
- public String getType() {
+ public String getConnectorType() {
return props.getProperty(CONNECTOR_TYPE);
}
@@ -38,6 +48,91 @@
return this.props;
}
+ public boolean isOfDBType(String type) {
+ return (this.dbtype.equalsIgnoreCase(type));
+ }
+ public int getBitMask() {
+ return this.bitMask;
+ }
+
+
+ /**
+ * These types match the "ddl" directories for supported database types
+ * and it also found in the datasources connection.properties defined by the DB_TYPE property
+ * @author vanhalbert
+ *
+ */
+ public static interface DataSourcTypes{
+ public static String MYSQL = "mysql";
+ public static String ORACLE = "oracle";
+ public static String POSTRES = "postgres";
+ public static String SQLSERVER = "sqlserver";
+ public static String DB2 = "db2";
+ public static String SYBASE = "sybase";
+ public static String DERBY = "derby";
+
+ }
+
+
+ /**
+ * These bitmask are used by the test to indicate which database type(s) a specific
+ * test is not supported to run against.
+ *
+ * The exclusion postion was taken because the goal is that all test should be able to
+ * run against all sources. However, there are cases where specific database type
+ * test are needed.
+ *
+ *
+ * @author vanhalbert
+ *
+ */
+ public static interface ExclusionTypeBitMask{
+
+ // Constants to hold bit masks for desired flags
+ static final int NONE_EXCLUDED = 0; // 000...00000000 (empty mask)
+ static final int MYSQL = 1; // 2^^0 000...00000001
+ static final int ORACLE = 2; // 2^^1 000...00000010
+ static final int POSTGRES = 4; // 2^^2 000...00000100
+ static final int SQLSERVER = 8; // 2^^3 000...00001000
+ static final int DB2 = 16; // 2^^4 000...00010000
+ static final int SYBASE = 32; // 2^^5 000...00100000
+ static final int DERBY = 64; // 2^^6 000...01000000
+
+ }
+ // don't include excluded
+ public static int NumBitMasks = 7;
+//
+// static int ALLOWABLE_DATA_TYPES = ExclusionTypeBitMask.MYSQL |
+// ExclusionTypeBitMask.ORACLE |
+// ExclusionTypeBitMask.POSTGRES |
+// ExclusionTypeBitMask.SQLSERVER |
+// ExclusionTypeBitMask.DB2 |
+// ExclusionTypeBitMask.SYBASE |
+// ExclusionTypeBitMask.DERBY;
+
+ static {
+ dbtypeBitMaskMap = new HashMap<String, String>(NumBitMasks );
+ dbtypeBitMaskMap.put(DataSourcTypes.MYSQL, String.valueOf(ExclusionTypeBitMask.MYSQL));
+ dbtypeBitMaskMap.put(DataSourcTypes.ORACLE, String.valueOf(ExclusionTypeBitMask.ORACLE));
+ dbtypeBitMaskMap.put(DataSourcTypes.POSTRES, String.valueOf(ExclusionTypeBitMask.POSTGRES));
+ dbtypeBitMaskMap.put(DataSourcTypes.DB2, String.valueOf(ExclusionTypeBitMask.DB2));
+ dbtypeBitMaskMap.put(DataSourcTypes.SQLSERVER, String.valueOf(ExclusionTypeBitMask.SQLSERVER));
+ dbtypeBitMaskMap.put(DataSourcTypes.SYBASE, String.valueOf(ExclusionTypeBitMask.SYBASE));
+ dbtypeBitMaskMap.put(DataSourcTypes.DERBY, String.valueOf(ExclusionTypeBitMask.DERBY));
+
+ }
+
+ public void setBitMask() {
+ int rtn = ExclusionTypeBitMask.NONE_EXCLUDED;
+
+ String bitmask = dbtypeBitMaskMap.get(dbtype);
+ if (bitmask == null) {
+ bitMask = rtn;
+ } else {
+ bitMask = new Integer(bitmask).intValue();
+ }
+ }
+
}
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-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/datasource/DataSourceMgr.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -34,8 +34,10 @@
*
*/
public class DataSourceMgr {
+
- static final String DIRECTORY = "datasources/";
+
+ static final String RELATIVE_DIRECTORY = "datasources/";
static final String DATASOURCE_MAPPING_FILE = "datasource_mapping.xml";
private static DataSourceMgr _instance = null;
@@ -44,9 +46,11 @@
private Map<String, DataSource> allDatasourcesMap = new HashMap<String, DataSource>(); // key=datasource name
- private Map<String, DataSource> modelToDatasourceMap = new HashMap<String, DataSource>(); // key=modelname
+ private Map<String, DataSource> modelToDatasourceMap = new HashMap<String, DataSource>(); // key=modelname + "_" + datasourcename
+ // key=modelname + "_" + groupname
- private Set<String> usedDataSources = new HashSet<String>();
+ // this set is use to track datasources that have already been assigned
+ private Set<String> assignedDataSources = new HashSet<String>();
private DataSourceMgr() {
@@ -73,6 +77,55 @@
return allDatasourcesMap.size();
}
+ /**
+ *
+ *
+ * @param dsidentifier is the DataSource identifier that is defined in the config properties
+ * @param excludeDSBitMask is a bit mask that indicates with DataSources to be excluded
+ * @param numDSRequired indicates the number of datasources that are required for the test
+ * @return
+ *
+ * @since
+ */
+ public boolean hasAvailableDataSource(String dsidentifier, int excludeDSBitMask) {
+
+ // no datasources are excluded
+ if (excludeDSBitMask == DataSource.ExclusionTypeBitMask.NONE_EXCLUDED) {
+ return true;
+ }
+
+ if (dstypeMap.containsKey(dsidentifier)) {
+ Map datasources = dstypeMap.get(dsidentifier);
+ Iterator<DataSource> it= datasources.values().iterator();
+ while(it.hasNext()) {
+ DataSource ds = it.next();
+ int dsbitmask = ds.getBitMask();
+
+ if ((excludeDSBitMask & dsbitmask) == dsbitmask) {
+
+ } else {
+ return true;
+ }
+
+ }
+ return false;
+ } else {
+ DataSource ds = allDatasourcesMap.get(dsidentifier);
+ if (ds == null) {
+ return false;
+ }
+
+ int dsbitmask = ds.getBitMask();
+ if ((excludeDSBitMask & dsbitmask) == dsbitmask) {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ }
+
public DataSource getDatasource(String datasourceid, String modelName)
throws QueryTestFailedException {
DataSource ds = null;
@@ -81,33 +134,57 @@
// this is so the next time this combination is requested,
// the same datasource is returned to ensure when consecutive calls during the process
// corresponds to the same datasource
- String key = modelName + "_"+datasourceid;
+ String key = null;
+ key = modelName + "_"+datasourceid;
+
+ // if the datasourceid represents a group name, then use the group name
+ // so that all future request using that group name for a specified model
+ // will use the same datasource
if (modelToDatasourceMap.containsKey(key)) {
return modelToDatasourceMap.get(key);
}
+
+
if (dstypeMap.containsKey(datasourceid)) {
Map datasources = dstypeMap.get(datasourceid);
Iterator<DataSource> it= datasources.values().iterator();
+
+ // need to go thru all the datasources to know if any has already been assigned
+ // because the datasourceid passed in was a group name
while(it.hasNext()) {
DataSource checkit = it.next();
- if (!usedDataSources.contains(checkit.getName())) {
- usedDataSources.add(checkit.getName());
- ds = checkit;
- break;
+ String dskey = modelName + "_"+checkit.getName();
+ if (modelToDatasourceMap.containsKey(dskey)) {
+ return modelToDatasourceMap.get(dskey);
+ } else if (ds == null) {
+ if (!assignedDataSources.contains(checkit.getName())) {
+ ds = checkit;
+ key = dskey;
+ }
+
}
}
+
+ if (ds != null) {
+ assignedDataSources.add(ds.getName());
+
+ modelToDatasourceMap.put(key, ds);
+
+ }
+
} else {
ds = allDatasourcesMap.get(datasourceid);
+
}
if (ds == null) {
throw new QueryTestFailedException("DatasourceID " + datasourceid
+ " is not a defined datasource in the mappings file ");
}
-
+
modelToDatasourceMap.put(key, ds);
return ds;
@@ -145,7 +222,6 @@
for (Iterator<Element> it = rootElements.iterator(); it.hasNext();) {
Element type = it.next();
-// System.out.println("Loading ds transactional type " + type.getName());
String typename = type.getAttributeValue(Property.Attributes.NAME);
List<Element> typeElements = type.getChildren();
@@ -154,7 +230,6 @@
for (Iterator<Element> typeit = typeElements.iterator(); typeit.hasNext();) {
Element e = typeit.next();
-// System.out.println("Loading ds type " + e.getName());
addDataSource(e, typename, datasources);
}
dstypeMap.put(typename, datasources);
@@ -170,7 +245,7 @@
"No Datasources were found in the mappings file");
}
- System.out.println("Number of datasource types loaded " + dstypeMap.size());
+ System.out.println("Number of datasource groups loaded " + dstypeMap.size());
System.out.println("Number of total datasource mappings loaded " + allDatasourcesMap.size());
@@ -182,7 +257,7 @@
Properties props = getProperties(element);
String dir = props.getProperty(DataSource.DIRECTORY);
- String dsfile = DIRECTORY + dir + "/connection.properties";
+ String dsfile = RELATIVE_DIRECTORY + dir + "/connection.properties";
Properties dsprops = loadProperties(dsfile);
if (dsprops != null) {
props.putAll(dsprops);
@@ -236,13 +311,13 @@
private static InputStream getInputStream() {
InputStream in = DataSourceMgr.class.getResourceAsStream("/"
- + DIRECTORY + DATASOURCE_MAPPING_FILE);
+ + RELATIVE_DIRECTORY + DATASOURCE_MAPPING_FILE);
if (in != null) {
return in;
} else {
throw new RuntimeException(
- "Failed to load datasource mapping file '" + DIRECTORY
+ "Failed to load datasource mapping file '" + RELATIVE_DIRECTORY
+ DATASOURCE_MAPPING_FILE + "'");
}
@@ -270,17 +345,35 @@
}
public static void main(String[] args) {
+
+
DataSourceMgr mgr = DataSourceMgr.getInstance();
try {
- DataSource ds1 = mgr.getDatasource("ds_mysql5", "model1");
+ DataSource ds1 = mgr.getDatasource("ds_mysql", "model1");
- DataSource ds2 = mgr.getDatasource("ds_mysql5", "model1");
+ DataSource ds2 = mgr.getDatasource("nonxa", "model1");
if (ds1 != ds2) {
throw new RuntimeException("Datasources are not the same");
}
- System.out.println("Value for ds_mysql5: "
- + mgr.getDatasourceProperties("ds_mysql5", "model1"));
+ System.out.println("Value for ds_mysql: "
+ + mgr.getDatasourceProperties("ds_mysql", "model1"));
+
+ boolean shouldbeavail = mgr.hasAvailableDataSource("nonxa", DataSource.ExclusionTypeBitMask.ORACLE);
+ if (!shouldbeavail) {
+ throw new RuntimeException("Should have found one available");
+ }
+
+ shouldbeavail = mgr.hasAvailableDataSource("nonxa", DataSource.ExclusionTypeBitMask.ORACLE | DataSource.ExclusionTypeBitMask.MYSQL);
+ if (!shouldbeavail) {
+ throw new RuntimeException("Should have found one available");
+ }
+
+
+ boolean shouldnot = mgr.hasAvailableDataSource("nonxa", DataSource.ExclusionTypeBitMask.ORACLE | DataSource.ExclusionTypeBitMask.MYSQL | DataSource.ExclusionTypeBitMask.SQLSERVER);
+ if (shouldnot) {
+ throw new RuntimeException("Should NOT have found one available");
+ }
} catch (QueryTestFailedException e) {
e.printStackTrace();
}
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/transaction/TransactionFactory.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/transaction/TransactionFactory.java 2009-09-18 17:45:50 UTC (rev 1376)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/transaction/TransactionFactory.java 2009-09-18 17:49:14 UTC (rev 1377)
@@ -4,6 +4,7 @@
*/
package org.teiid.test.framework.transaction;
+import org.teiid.test.framework.ConfigPropertyLoader;
import org.teiid.test.framework.TransactionContainer;
import org.teiid.test.framework.exception.TransactionRuntimeException;
import org.teiid.test.framework.connection.ConnectionStrategy;
@@ -16,16 +17,11 @@
public static final String LOCAL_TRANSACTION = "local"; //$NON-NLS-1$
public static final String XATRANSACTION = "xa"; //$NON-NLS-1$
public static final String JNDI_TRANSACTION = "jndi"; //$NON-NLS-1$
-// public static final String OFFWRAP_TRANSACTION = "offwrap"; //$NON-NLS-1$
-// public static final String ONWRAP_TRANSACTION = "onwrap"; //$NON-NLS-1$
-
-
/**
* Transaction Type indicates the type of transaction container to use
*/
public static final String TRANSACTION_TYPE = "transaction-type"; //$NON-NLS-1$
-// public static final String AUTOCOMMIT = "autocommit"; //$NON-NLS-1$
private TransactionFactory(){}
@@ -34,6 +30,10 @@
public static TransactionContainer create() {
TransactionContainer transacton = null;
+ // load the configuration properties defined at this time for the test
+ ConfigPropertyLoader.loadConfigurationProperties();
+
+
ConnectionStrategy connstrategy = ConnectionStrategyFactory.getInstance().getConnectionStrategy();
15 years, 3 months
teiid SVN: r1376 - trunk/test-integration/db/src/main/resources/ddl.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:45:50 -0400 (Fri, 18 Sep 2009)
New Revision: 1376
Modified:
trunk/test-integration/db/src/main/resources/ddl/exec_parms.properties_template
trunk/test-integration/db/src/main/resources/ddl/manage_schemas.xml
trunk/test-integration/db/src/main/resources/ddl/run_ddl.xml
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/main/resources/ddl/exec_parms.properties_template
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/exec_parms.properties_template 2009-09-18 17:42:56 UTC (rev 1375)
+++ trunk/test-integration/db/src/main/resources/ddl/exec_parms.properties_template 2009-09-18 17:45:50 UTC (rev 1376)
@@ -3,7 +3,7 @@
# Each database type in the "ddl" directory must have an exec_parms.properties file.
-# For property setting options, see the Sql ant task page at @ http://ant.apache.org/manual/index.html
+# For property setting options, see the SQL ant task page at @ http://ant.apache.org/manual/index.html
delim=;
delimtype=normal
Modified: trunk/test-integration/db/src/main/resources/ddl/manage_schemas.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/manage_schemas.xml 2009-09-18 17:42:56 UTC (rev 1375)
+++ trunk/test-integration/db/src/main/resources/ddl/manage_schemas.xml 2009-09-18 17:45:50 UTC (rev 1376)
@@ -16,7 +16,7 @@
<target name="check">
- <echo>Running for USERNAME = ${User}</echo>
+
<echo>Perform check</echo>
<condition property="all">
<not>
@@ -41,6 +41,7 @@
<subant genericantfile="${resources.dir}/ddl/run_ddl.xml" inheritall="true" >
<dirset dir="${resources.dir}/datasources/" />
<property name="sql.ddl.dir" value="${resources.dir}/ddl"/>
+ <property name="lib.dir" value="${basedir}/lib"/>
</subant>
@@ -58,7 +59,9 @@
<ant inheritAll="true" antfile="${resources.dir}/ddl/run_ddl.xml">
<property name="basedir" value="${resources.dir}/datasources/${single}"/>
<property name="sql.ddl.dir" value="${resources.dir}/ddl"/>
+ <property name="lib.dir" value="${basedir}/lib"/>
+
</ant>
<echo>Completed creating single schema ${single}</echo>
Modified: trunk/test-integration/db/src/main/resources/ddl/run_ddl.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/run_ddl.xml 2009-09-18 17:42:56 UTC (rev 1375)
+++ trunk/test-integration/db/src/main/resources/ddl/run_ddl.xml 2009-09-18 17:45:50 UTC (rev 1376)
@@ -212,7 +212,7 @@
<echo>Admin account: ${adminuser} url: ${adminurl}</echo>
<available file="${script.file}" property="script.file.exist"/>
-
+
<fail unless="script.file.exist" message="${script.file} does not exist" />
<sql driver="${driver}"
@@ -224,11 +224,16 @@
delimiter="${delim}"
delimitertype="${delimtype}"
autocommit="${autocommit}"
- onerror="${onerror}"
- classpath="${maven.runtime.classpath}"
- />
-
-
+ onerror="${onerror}" >
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ <include name="jbedsp-datadirect-0.0.1-SNAPSHOT.jar" />
+ </fileset>
+ <pathelement path="${maven.runtime.classpath}"/>
+ </classpath>
+
+ </sql>
</target>
<!--
@@ -238,13 +243,11 @@
<target name="execute.tables.sql" >
<echo>Executing table script file ${script.file}</echo>
<echo>User account: ${User} url: ${URL}</echo>
- <echo>Classpath: ${maven.runtime.classpath}</echo>
<available file="${script.file}" property="script.file.exist"/>
<fail unless="script.file.exist" message="DDL ${script.file} does not exist" />
-
<sql driver="${driver}"
url="${URL}"
userid="${User}"
@@ -254,9 +257,16 @@
delimiter="${delim}"
delimitertype="${delimtype}"
autocommit="${autocommit}"
- onerror="${onerror}"
- classpath="${maven.runtime.classpath}"
- />
+ onerror="${onerror}" >
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+ <pathelement path="${maven.runtime.classpath}"/>
+ </classpath>
+
+
+ </sql>
</target>
@@ -278,9 +288,17 @@
delimiter="${delim}"
delimitertype="${delimtype}"
autocommit="${autocommit}"
- onerror="${onerror}"
- classpath="${maven.runtime.classpath}"
- />
+ onerror="${onerror}" >
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+ <pathelement path="${maven.runtime.classpath}"/>
+ </classpath>
+
+
+ </sql>
+
</target>
15 years, 3 months
teiid SVN: r1375 - trunk/test-integration/db/src/main/resources/datasources.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:42:56 -0400 (Fri, 18 Sep 2009)
New Revision: 1375
Modified:
trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 17:41:30 UTC (rev 1374)
+++ trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 17:42:56 UTC (rev 1375)
@@ -18,7 +18,8 @@
This configuration specifies the following information:
- It indicates the location ("dir") to find the datasource connection
information that is used to populate the connector bindings and create
- direct connections to the source
+ direct connections to the source.
+
- It provides a mapping to the Connector Type that needs
to be specified when deploying the ConnectorBinding and assigning it to
the mapped model (see default.config.properties)
@@ -38,6 +39,10 @@
<property name="dir">oracle</property>
<property name="connectortype">Oracle Connector</property>
</datasource>
+ <datasource name="ds_sqlserver">
+ <property name="dir">sqlserver</property>
+ <property name="connectortype">SQL Server Connector</property>
+ </datasource>
<datasource name="ds_db2">
<property name="dir">db2</property>
<property name="connectortype">DB2 Connector</property>
@@ -63,6 +68,10 @@
<property name="dir">oracle</property>
<property name="connectortype">Oracle XA Connector</property>
</datasource>
+ <datasource name="ds_sqlserver">
+ <property name="dir">sqlserver</property>
+ <property name="connectortype">SQL Server XA Connector</property>
+ </datasource>
<datasource name="ds_db2_xa">
<property name="dir">db2</property>
<property name="connectortype">DB2 XA Connector</property>
15 years, 3 months
teiid SVN: r1374 - in trunk/test-integration/db/src/main/resources/datasources: derby and 3 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:41:30 -0400 (Fri, 18 Sep 2009)
New Revision: 1374
Added:
trunk/test-integration/db/src/main/resources/datasources/oracle/
trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
trunk/test-integration/db/src/main/resources/datasources/sqlserver/
trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
Modified:
trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties
trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties 2009-09-18 17:37:15 UTC (rev 1373)
+++ trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties 2009-09-18 17:41:30 UTC (rev 1374)
@@ -1,4 +1,4 @@
-# db.type must match a ddl folder and it also represents the ANT sql datatype used during execution
+# db.type must match a ddl folder
db.type=derby
driver=org.apache.derby.jdbc.ClientDriver
URL=jdbc:derby://localhost:1527//(derby location)
Modified: trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties 2009-09-18 17:37:15 UTC (rev 1373)
+++ trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties 2009-09-18 17:41:30 UTC (rev 1374)
@@ -1,4 +1,4 @@
-# db.type must match a ddl folder and it also represents the ANT sql datatype used during execution
+# db.type must match a ddl folder
db.type=mysql
driver=com.mysql.jdbc.Driver
URL=jdbc:mysql://(servername):3306/(databasename)
Added: trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties 2009-09-18 17:41:30 UTC (rev 1374)
@@ -0,0 +1,18 @@
+# db.type must match a ddl folder
+db.type=oracle
+driver=oracle.jdbc.OracleDriver
+URL=jdbc:oracle:thin:@(servername):1521:(sid)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=1527
+ds-jndiname=(servername)_1527
+
+Immutable=true
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties 2009-09-18 17:41:30 UTC (rev 1374)
@@ -0,0 +1,18 @@
+# db.type must match a ddl folder
+db.type=sqlserver
+driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
+URL=jdbc:sqlserver://(servername):1433;databaseName=(databasename)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=1433
+ds-jndiname=microsoft_1433
+
+Immutable=true
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
teiid SVN: r1373 - trunk/test-integration/db/src/main/resources/datasources/postgres.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:37:15 -0400 (Fri, 18 Sep 2009)
New Revision: 1373
Modified:
trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties 2009-09-18 17:36:47 UTC (rev 1372)
+++ trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties 2009-09-18 17:37:15 UTC (rev 1373)
@@ -1,3 +1,4 @@
+# db.type must match a ddl folder
db.type=postgres
driver=org.postgresql.Driver
URL=jdbc:postgresql://(servername):5432/(databasename)
15 years, 3 months
teiid SVN: r1372 - in trunk/test-integration/db/src/main/resources/ddl: sqlserver and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:36:47 -0400 (Fri, 18 Sep 2009)
New Revision: 1372
Added:
trunk/test-integration/db/src/main/resources/ddl/sqlserver/
trunk/test-integration/db/src/main/resources/ddl/sqlserver/create_tables.sql
trunk/test-integration/db/src/main/resources/ddl/sqlserver/drop_tables.sql
trunk/test-integration/db/src/main/resources/ddl/sqlserver/exec_parms.properties
Log:
Teiid 773 - organize integration test
Added: trunk/test-integration/db/src/main/resources/ddl/sqlserver/create_tables.sql
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/sqlserver/create_tables.sql (rev 0)
+++ trunk/test-integration/db/src/main/resources/ddl/sqlserver/create_tables.sql 2009-09-18 17:36:47 UTC (rev 1372)
@@ -0,0 +1,13 @@
+
+-- these tables are used by custom junit test for testing transactions
+
+create Table g1 (
+ e1 NUMERIC(5),
+ e2 VARCHAR(50),
+ PRIMARY KEY (e1)
+);
+create Table g2 (
+ e1 NUMERIC(5) REFERENCES g1 (e1),
+ e2 VARCHAR(50)
+);
+
\ No newline at end of file
Added: trunk/test-integration/db/src/main/resources/ddl/sqlserver/drop_tables.sql
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/sqlserver/drop_tables.sql (rev 0)
+++ trunk/test-integration/db/src/main/resources/ddl/sqlserver/drop_tables.sql 2009-09-18 17:36:47 UTC (rev 1372)
@@ -0,0 +1,6 @@
+
+-- drop the tables
+
+drop Table g2;
+drop Table g1;
+
\ No newline at end of file
Added: trunk/test-integration/db/src/main/resources/ddl/sqlserver/exec_parms.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/sqlserver/exec_parms.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/ddl/sqlserver/exec_parms.properties 2009-09-18 17:36:47 UTC (rev 1372)
@@ -0,0 +1,3 @@
+delim=GO
+delimtype=normal
+rdbms.type=mircrosoft
Property changes on: trunk/test-integration/db/src/main/resources/ddl/sqlserver/exec_parms.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
teiid SVN: r1371 - trunk/test-integration/db/src/main/resources.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 13:36:09 -0400 (Fri, 18 Sep 2009)
New Revision: 1371
Modified:
trunk/test-integration/db/src/main/resources/default-config.properties
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/src/main/resources/default-config.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/default-config.properties 2009-09-18 17:09:52 UTC (rev 1370)
+++ trunk/test-integration/db/src/main/resources/default-config.properties 2009-09-18 17:36:09 UTC (rev 1371)
@@ -59,11 +59,11 @@
#
#
-#pm1=nonxa
-#pm2=nonxa
+pm1=nonxa
+pm2=nonxa
-pm1=mysqlA
-pm2=mysqlB
+#pm1=mysqlA
+#pm2=mysqlB
15 years, 3 months