teiid SVN: r1600 - trunk/test-integration/db/src/test/java/org/teiid/test/testcases.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 15:33:59 -0500 (Wed, 25 Nov 2009)
New Revision: 1600
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
Log:
Teiid 773 - Turned off 2 tests for the time being because they are currently hanging, will revisit later
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 20:23:42 UTC (rev 1599)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 20:33:59 UTC (rev 1600)
@@ -582,7 +582,7 @@
* Note: This is producing the below error some times; however this is SQL Server issue.
* http://support.microsoft.com/?kbid=834849
*/
- public void testMultipleSourcePartialProcessingUsingMakedep() throws Exception {
+ public void xtestMultipleSourcePartialProcessingUsingMakedep() throws Exception {
AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingMakedep") {
public void testCase() throws Exception {
execute("select pm1.g1.e1, pm1.g1.e2 from pm1.g1 LEFT OUTER JOIN pm2.g1 MAKENOTDEP ON pm1.g1.e2 = pm2.g1.e2 where pm2.g1.e1 >= 50 and pm2.g1.e1 < 100");
16 years
teiid SVN: r1599 - trunk/documentation/reference/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-11-25 15:23:42 -0500 (Wed, 25 Nov 2009)
New Revision: 1599
Modified:
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
Log:
TEIID-251 TEIID-873 added support for order by expressions and removing parsing restrictions that limited quoted identifiers.
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-11-25 19:19:14 UTC (rev 1598)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2009-11-25 20:23:42 UTC (rev 1599)
@@ -46,17 +46,28 @@
</para>
</listitem>
<listitem>
+ <para>Identifiers in double quotes can have any contents.
+ The double quote character can it's be escaped with an additional double quote. e.g. "some "" id"
+ </para>
+ </listitem>
+ <listitem>
<para> Because different data sources organize tables in different
ways, some prepending catalog or schema or user information,
- Teiid allows the 'table_spec' to be a dot-delimited construct.
+ Teiid allows table specification to be a dot-delimited construct.
</para>
</listitem>
<listitem>
- <para> Identifiers are not case-sensitive in Teiid.</para>
+ <para> When a table specification contains a dot resolving will allow for the match of
+ a partial name against any number of the end segments in the name.
+ </para>
</listitem>
<listitem>
- <para>The separate parts of an identifier can be quoted, with double quotes. This is not required, but some tools do this automatically. Quotes establish another level of grouping, in addition to the dot delimiters. Quotes should not be used in such a way that the table specification, which may itself have multiple parts, is split between two quoted sections.</para>
+ <para> Columns, schemas, and aliases identifiers cannot contain a dot.
+ </para>
</listitem>
+ <listitem>
+ <para> Identifiers, even when quoted, are not case-sensitive in Teiid.</para>
+ </listitem>
</itemizedlist>
<itemizedlist>
<para> Some examples of valid fully-qualified table identifiers are:
@@ -774,15 +785,14 @@
</para>
<para>
Usage:
- <synopsis label="Usage">ORDER BY column1 [ASC|DESC], ...</synopsis>
+ <synopsis label="Usage">ORDER BY expression [ASC|DESC], ...</synopsis>
</para>
<itemizedlist>
<para>Syntax Rules:
</para>
<listitem>
<para>Sort columns may be specified positionally by a 1 based
- integer or string literal, by SELECT clause alias name, or by a column
- reference.</para>
+ integer, by SELECT clause alias name, by SELECT clause expression, or by an unrelated expression.</para>
</listitem>
<listitem>
<para>Column references may appear in the SELECT clause as the
@@ -793,6 +803,11 @@
clause.</para>
</listitem>
<listitem>
+ <para>Unrelated expressions, expressions not appearing as an aliased expression in the select clause,
+ are allowed in the order by clause of a non-set QUERY. The columns referenced in the expression must also follow the prior rule.
+ </para>
+ </listitem>
+ <listitem>
<para>The ORDER BY columns must be of a comparable type.</para>
</listitem>
<listitem>
16 years
teiid SVN: r1598 - trunk/test-integration/db/src/test/java/org/teiid/test/testcases.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 14:19:14 -0500 (Wed, 25 Nov 2009)
New Revision: 1598
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
Log:
Teiid 773 - commented out the "testMultipleSourcePartialProcessingUsingLimit, because it's hanging and not sure why at the money.
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 17:27:41 UTC (rev 1597)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 19:19:14 UTC (rev 1598)
@@ -562,7 +562,7 @@
* Note: This is producing the below error some times; however this is SQL Server issue.
* http://support.microsoft.com/?kbid=834849
*/
- public void testMultipleSourcePartialProcessingUsingLimit() throws Exception {
+ public void xtestMultipleSourcePartialProcessingUsingLimit() throws Exception {
AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingLimit") {
public void testCase() throws Exception {
execute("select * from vm.g1 where pm1e1 < 100 limit 10");
16 years
teiid SVN: r1596 - trunk/test-integration/db/src/test/java/org/teiid/test/testcases.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 12:13:52 -0500 (Wed, 25 Nov 2009)
New Revision: 1596
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionTests.java
Log:
Teiid 773 - added the name of the method being tested so that the output indicates the test being run
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 16:14:20 UTC (rev 1595)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2009-11-25 17:13:52 UTC (rev 1596)
@@ -77,7 +77,7 @@
* result = commit
*/
public void testSingleSourceSelect() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceSelect") {
public void testCase() throws Exception {
execute("select * from pm1.g1 where pm1.g1.e1 < 100");
assertRowCount(100);
@@ -98,7 +98,7 @@
* result = commit
*/
public void testSingleSourceUpdate() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceUpdate") {
public void testCase() throws Exception {
execute("insert into pm1.g1 (e1, e2) values(100, '100')");
}
@@ -122,7 +122,8 @@
* result = commit
*/
public void testSingleSourcePreparedUpdate() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourcePreparedUpdate") {
+
public void testCase() throws Exception {
execute("insert into pm1.g1 (e1, e2) values(?, ?)", new Object[] {new Integer(102), "102"});
}
@@ -145,7 +146,7 @@
* result = commit
*/
public void testSingleSourceMultipleCommands() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceMultipleCommands") {
public void testCase() throws Exception {
execute("delete from pm1.g1 where pm1.g1.e1 >= ?", new Object[] {new Integer(100)});
@@ -180,7 +181,7 @@
* result = commit
*/
public void testSingleSourcePartialProcessing() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourcePartialProcessing") {
public void testCase() throws Exception {
execute("select * from pm1.g1 where pm1.g1.e1 < 100 limit 10");
assertRowCount(10);
@@ -202,7 +203,7 @@
* result = commit
*/
public void testMultipleSourceSelect() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceSelect") {
public void testCase() throws Exception {
execute("select * from pm1.g1 join pm2.g1 on pm1.g1.e1 = pm2.g1.e1 where pm1.g1.e1 < 100");
assertRowCount(100);
@@ -220,7 +221,7 @@
* result = commit
*/
public void testMultipleSourceVirtualSelect() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceVirtualSelect") {
public void testCase() throws Exception {
execute("select * from vm.g1 where vm.g1.pm1e1 < 100");
assertRowCount(100);
@@ -238,7 +239,7 @@
* result = commit
*/
public void testMultipleSourceUpdate() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceUpdate") {
public void testCase() throws Exception {
execute("insert into vm.g1 (pm1e1, pm1e2, pm2e1, pm2e2) values(500, '500', 500, '500')");
}
@@ -266,7 +267,7 @@
* result = commit
*/
public void testMultipleSourceSelectInto() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceSelectInto") {
public void testCase() throws Exception {
execute("insert into vm.g1 (pm1e1, pm1e2, pm2e1, pm2e2) values(501, '501', 501, '501')");
execute("select pm1.g1.e1, pm1.g1.e2 into pm2.g2 from pm1.g1 where pm1.g1.e1 = 501");
@@ -295,7 +296,7 @@
* result = commit
*/
public void testMultipleSourceBulkRowInsert() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceBulkRowInsert") {
public void testCase() throws Exception {
for (int i = 100; i < 112; i++) {
Integer val = new Integer(i);
@@ -329,7 +330,7 @@
* result = commit
*/
public void testMultipleSourcePreparedUpdate() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePreparedUpdate") {
public void testCase() throws Exception {
Integer value = new Integer(500);
execute("insert into vm.g1 (pm1e1, pm1e2, pm2e1, pm2e2) values(?,?,?,?)", new Object[] {value, value.toString(), value, value.toString()});
@@ -359,7 +360,7 @@
* result = commit
*/
public void testMultipleSourceMultipleCommands() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleCommands") {
public void testCase() throws Exception {
execute("delete from pm1.g2 where e1 >= ?", new Object[] {new Integer(100)});
execute("delete from pm1.g1 where e1 >= ?", new Object[] {new Integer(100)});
@@ -409,7 +410,7 @@
* result = commit
*/
public void testMultipleSourceMultipleVirtualCommands() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleVirtualCommands") {
public void testCase() throws Exception {
for (int i = 200; i < 207; i++) {
@@ -453,7 +454,7 @@
* result = rollback
*/
public void testMultipleSourceMultipleCommandsCancel() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleCommandsCancel") {
public void testCase() throws Exception {
Thread t = new Thread("Cancel Thread") {
@@ -499,7 +500,7 @@
* result = rollback
*/
public void testMultipleSourceTimeout() throws Exception{
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceTimeout") {
public void testCase() throws Exception {
executeBatch(getMultipleSourceBatch(), 1); // time out after 1 sec
}
@@ -562,7 +563,7 @@
* http://support.microsoft.com/?kbid=834849
*/
public void testMultipleSourcePartialProcessingUsingLimit() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingLimit") {
public void testCase() throws Exception {
execute("select * from vm.g1 where pm1e1 < 100 limit 10");
assertRowCount(10);
@@ -582,7 +583,7 @@
* http://support.microsoft.com/?kbid=834849
*/
public void testMultipleSourcePartialProcessingUsingMakedep() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingMakedep") {
public void testCase() throws Exception {
execute("select pm1.g1.e1, pm1.g1.e2 from pm1.g1 LEFT OUTER JOIN pm2.g1 MAKENOTDEP ON pm1.g1.e2 = pm2.g1.e2 where pm2.g1.e1 >= 50 and pm2.g1.e1 < 100");
assertRowCount(50);
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionTests.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionTests.java 2009-11-25 16:14:20 UTC (rev 1595)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionTests.java 2009-11-25 17:13:52 UTC (rev 1596)
@@ -39,7 +39,7 @@
* result = rollback
*/
public void testSingleSourceMultipleCommandsExplicitRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceMultipleCommandsExplicitRollback") {
public void testCase() throws Exception {
for (int i = 200; i < 220; i++) {
execute("insert into pm1.g1 (e1, e2) values("+i+",'"+i+"')");
@@ -71,7 +71,7 @@
* result = rollback
*/
public void testSingleSourceMultipleCommandsReferentialIntegrityRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceMultipleCommandsReferentialIntegrityRollback") {
public void testCase() throws Exception {
for (int i = 200; i < 220; i++) {
Integer val = new Integer(i);
@@ -105,7 +105,7 @@
* result = rollback
*/
public void testMultipleSourceMultipleCommandsExplicitRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleCommandsExplicitRollback") {
public void testCase() throws Exception {
for (int i = 700; i < 720; i++) {
@@ -147,7 +147,7 @@
* result = rollback
*/
public void testMultipleSourceMultipleCommandsReferentialIntegrityRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleCommandsReferentialIntegrityRollback") {
public void testCase() throws Exception {
for (int i = 700; i < 720; i++) {
@@ -190,7 +190,7 @@
* result = commit
*/
public void testMultipleSourceBulkRowInsertRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceBulkRowInsertRollback") {
public void testCase() throws Exception {
for (int i = 100; i < 120; i++) {
Integer val = new Integer(i);
@@ -231,7 +231,7 @@
* result = commit
*/
public void testMultipleSourceMultipleVirtualCommandsRollback() throws Exception {
- AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest() {
+ AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceMultipleVirtualCommandsRollback") {
public void testCase() throws Exception {
for (int i = 600; i < 615; i++) {
16 years
teiid SVN: r1595 - trunk/test-integration/db.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 11:14:20 -0500 (Wed, 25 Nov 2009)
New Revision: 1595
Modified:
trunk/test-integration/db/pom.xml
Log:
Teiid 773 - fixed dependencies
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2009-11-25 15:51:46 UTC (rev 1594)
+++ trunk/test-integration/db/pom.xml 2009-11-25 16:14:20 UTC (rev 1595)
@@ -61,69 +61,31 @@
<dependencies>
+
<dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
</dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-internal</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-metadata</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-metadata</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
<version>${project.version}</version>
- <type>test-jar</type>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-connector-api</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-client-jdbc</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-engine</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-txn-jbossts</artifactId>
@@ -136,12 +98,14 @@
<artifactId>teiid-runtime</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-runtime</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-loopback</artifactId>
@@ -152,32 +116,100 @@
<artifactId>connector-text</artifactId>
<version>${project.version}</version>
</dependency>
+
+
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-text</artifactId>
+ <artifactId>connector-jdbc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-engine</artifactId>
+ <version>${project.version}</version>
<type>test-jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+<!--
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-internal</artifactId>
<version>${project.version}</version>
+ <type>test-jar</type>
</dependency>
<dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-jdbc</artifactId>
+ <artifactId>connector-text</artifactId>
+ <type>test-jar</type>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-jdbc</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>
+
- <!-- external dependencies -->
+
+
<dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${derby.version}</version>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-connector-sdk</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-metadata</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-connector-sdk</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+-->
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-client-jdbc</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-client</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+
<!--
</dependencies>
@@ -206,6 +238,13 @@
<version>${derby.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>${derby.version}</version>
+
+ </dependency>
+
<!-- DBUnit dependencies -->
<dependency>
16 years
teiid SVN: r1594 - in trunk/engine/src: main/resources/com/metamatrix/query and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-11-25 10:51:46 -0500 (Wed, 25 Nov 2009)
New Revision: 1594
Added:
trunk/engine/src/test/java/org/teiid/metadata/
trunk/engine/src/test/java/org/teiid/metadata/TestCompositeMetadataStore.java
Modified:
trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
trunk/engine/src/main/resources/com/metamatrix/query/i18n.properties
Log:
TEIID-46 refining the fix for proc resolution
Modified: trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java 2009-11-25 15:29:54 UTC (rev 1593)
+++ trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java 2009-11-25 15:51:46 UTC (rev 1594)
@@ -37,6 +37,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.metadata.runtime.api.MetadataSource;
+import com.metamatrix.query.QueryPlugin;
/**
* Aggregates the metadata from multiple stores.
@@ -113,7 +114,7 @@
String fullName = p.getFullName();
if (fullName.regionMatches(true, fullName.length() - name.length(), name, 0, name.length())) {
if (result != null) {
- return null; //don't allow ambiguous
+ throw new QueryMetadataException(QueryPlugin.Util.getString("ambiguous_procedure", name.substring(1))); //$NON-NLS-1$
}
result = p;
}
Modified: trunk/engine/src/main/resources/com/metamatrix/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/query/i18n.properties 2009-11-25 15:29:54 UTC (rev 1593)
+++ trunk/engine/src/main/resources/com/metamatrix/query/i18n.properties 2009-11-25 15:51:46 UTC (rev 1594)
@@ -193,6 +193,7 @@
ERR.015.008.0053= Element "{0}" is ambiguous, it exists in two or more groups.
ERR.015.008.0054= Element "{0}" is not defined by any relevant group.
ERR.015.008.0055= Group specified is ambiguous, resubmit the query by fully qualifying the group name
+ambiguous_procedure= Procedure ''{0}'' is ambiguous, use the fully qualified name instead
ERR.015.008.0056= Group does not exist
ERR.015.008.0057= Variable {0} is not resolvable.
ERR.015.008.0058= Variable {0} is declared with an invalid datatype {1}
Added: trunk/engine/src/test/java/org/teiid/metadata/TestCompositeMetadataStore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/metadata/TestCompositeMetadataStore.java (rev 0)
+++ trunk/engine/src/test/java/org/teiid/metadata/TestCompositeMetadataStore.java 2009-11-25 15:51:46 UTC (rev 1594)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.metadata;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.teiid.connector.metadata.runtime.Datatype;
+import org.teiid.connector.metadata.runtime.MetadataFactory;
+
+import com.metamatrix.api.exception.query.QueryMetadataException;
+import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.metadata.runtime.api.MetadataSource;
+
+public class TestCompositeMetadataStore {
+
+ @Test public void testAmbiguousProc() throws Exception {
+ Map<String, Datatype> datatypes = new HashMap<String, Datatype>();
+ datatypes.put(DataTypeManager.DefaultDataTypes.STRING, new Datatype());
+ MetadataFactory mf = new MetadataFactory("x", datatypes, new Properties()); //$NON-NLS-1$
+ mf.addProcedure("y"); //$NON-NLS-1$
+ MetadataFactory mf1 = new MetadataFactory("x1", datatypes, new Properties()); //$NON-NLS-1$
+ mf1.addProcedure("y"); //$NON-NLS-1$
+ CompositeMetadataStore cms = new CompositeMetadataStore(Arrays.asList(mf.getMetadataStore(), mf1.getMetadataStore()), Mockito.mock(MetadataSource.class));
+ try {
+ cms.getStoredProcedure("y"); //$NON-NLS-1$
+ fail("expected exception"); //$NON-NLS-1$
+ } catch (QueryMetadataException e) {
+ assertEquals("Procedure 'y' is ambiguous, use the fully qualified name instead", e.getMessage()); //$NON-NLS-1$
+ }
+ }
+
+}
Property changes on: trunk/engine/src/test/java/org/teiid/metadata/TestCompositeMetadataStore.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years
teiid SVN: r1593 - trunk/test-integration/db/src/test/java/org/teiid/test/testcases.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 10:29:54 -0500 (Wed, 25 Nov 2009)
New Revision: 1593
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/BaseAbstractTransactionTestCase.java
Log:
Teiid 773 - refactored back in the way jbedsp transaction classes where defined and added the other integration test
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/BaseAbstractTransactionTestCase.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/BaseAbstractTransactionTestCase.java 2009-11-25 15:29:33 UTC (rev 1592)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/BaseAbstractTransactionTestCase.java 2009-11-25 15:29:54 UTC (rev 1593)
@@ -4,13 +4,10 @@
import org.teiid.test.framework.ConfigPropertyLoader;
import org.teiid.test.framework.TransactionContainer;
-import org.teiid.test.framework.exception.TransactionRuntimeException;
public abstract class BaseAbstractTransactionTestCase extends TestCase {
- protected ConfigPropertyLoader config = null;
protected TransactionContainer container = null;
- protected boolean setupData = true;
public BaseAbstractTransactionTestCase(String name) {
super(name);
@@ -19,22 +16,27 @@
}
protected abstract TransactionContainer getTransactionContainter();
+
+
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ }
- protected ConfigPropertyLoader getConfig() {
- return this.config;
+ @Override
+ protected void tearDown() throws Exception {
+ // TODO Auto-generated method stub
+ super.tearDown();
+
}
+
protected void addProperty(String key, String value) {
- if (config == null) {
- try {
- setUp();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- throw new TransactionRuntimeException(e);
- }
- }
- config.setProperty(key, value);
+
+ ConfigPropertyLoader.getInstance().setProperty(key, value);
+
}
16 years
teiid SVN: r1592 - trunk/test-integration/db/src/main/resources/ddl/mysql.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 10:29:33 -0500 (Wed, 25 Nov 2009)
New Revision: 1592
Modified:
trunk/test-integration/db/src/main/resources/ddl/mysql/create_tables.sql
Log:
Teiid 773 - fixed sql
Modified: trunk/test-integration/db/src/main/resources/ddl/mysql/create_tables.sql
===================================================================
--- trunk/test-integration/db/src/main/resources/ddl/mysql/create_tables.sql 2009-11-25 15:26:10 UTC (rev 1591)
+++ trunk/test-integration/db/src/main/resources/ddl/mysql/create_tables.sql 2009-11-25 15:29:33 UTC (rev 1592)
@@ -1,10 +1,12 @@
-- these tables are used by custom junit test for testing transactions
-
-create Table g1 (e1 NUMERIC(5) PRIMARY KEY, e2 varchar(50));
-create Table g2 (e1 NUMERIC(5) REFERENCES g1 (e1), e2 varchar(50));
-
create Table g1 (e1 NUMERIC(5) PRIMARY KEY, e2 varchar(50))ENGINE=INNODB;
create Table g2 (e1 NUMERIC(5), e2 varchar(50), FOREIGN KEY (e1) REFERENCES g1(e1))ENGINE=INNODB;
+
+--create Table g1 (e1 NUMERIC(5) PRIMARY KEY, e2 varchar(50));
+--create Table g2 (e1 NUMERIC(5) REFERENCES g1 (e1), e2 varchar(50));
+
+
+
\ No newline at end of file
16 years
teiid SVN: r1591 - trunk/test-integration/db/src/main/java/org/teiid/test/framework.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 10:26:10 -0500 (Wed, 25 Nov 2009)
New Revision: 1591
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
Log:
Teiid 773 - refactored back in the way jbedsp transaction classes where defined and added the other 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-11-25 14:18:01 UTC (rev 1590)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/ConfigPropertyLoader.java 2009-11-25 15:26:10 UTC (rev 1591)
@@ -32,7 +32,15 @@
private static ConfigPropertyLoader _instance = null;
private static String LAST_CONFIG_FILE = null;
+
+ /**
+ * Contains any overrides specified for the test
+ */
+ private Properties overrides = new Properties();
+ /**
+ * Contains the properties loaded from the config file
+ */
private Properties props = null;
private Map<String, String>modelAssignedDatabaseType = new HashMap<String, String>(5);
@@ -84,6 +92,7 @@
}
public static synchronized void cleanup() {
+ _instance.overrides.clear();
_instance.modelAssignedDatabaseType.clear();
_instance.props.clear();
if (_instance.dsfactory != null) {
@@ -93,15 +102,6 @@
LAST_CONFIG_FILE=null;
}
-// private void loadConfigurationProperties() {
-// String filename = System.getProperty(ConfigPropertyNames.CONFIG_FILE);
-// if (filename == null) {
-// filename = DEFAULT_CONFIG_FILE_NAME;
-// }
-//
-// loadProperties(LAST_CONFIG_FILE);
-//
-// }
private void initialize() {
loadProperties(LAST_CONFIG_FILE);
@@ -114,15 +114,30 @@
public String getProperty(String key) {
- return props.getProperty(key);
+ String rtn = null;
+ rtn = overrides.getProperty(key);
+ if (rtn == null) {
+ rtn = props.getProperty(key);
+
+ if (rtn == null) {
+ rtn = System.getProperty(key);
+ }
+ }
+ return rtn;
}
public void setProperty(String key, String value) {
- props.setProperty(key, value);
+ overrides.setProperty(key, value);
}
public Properties getProperties() {
- return props;
+
+ Properties p = new Properties();
+ p.putAll(System.getProperties());
+ p.putAll(props);
+ p.putAll(overrides);
+
+ return p;
}
public Map<String, String> getModelAssignedDatabaseTypes() {
@@ -135,9 +150,7 @@
private void loadProperties(String filename) {
- Properties sysprops = PropertiesUtils.clone(System.getProperties());
-
- props = PropUtils.loadProperties("/" + filename, sysprops);
+ props = PropUtils.loadProperties("/" + filename, null);
}
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-11-25 14:18:01 UTC (rev 1590)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/TransactionContainer.java 2009-11-25 15:26:10 UTC (rev 1591)
@@ -88,7 +88,8 @@
// cleanup all connections created for this test.
if (connStrategy != null) {
connStrategy.shutdown();
- }
+ }
+ }
}
}
16 years
teiid SVN: r1590 - trunk/test-integration/db/src/main/java/org/teiid/test/util.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-11-25 09:18:01 -0500 (Wed, 25 Nov 2009)
New Revision: 1590
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/util/PropUtils.java
Log:
Teiid 773 - refactored back in the way jbedsp transaction classes where defined and added the other integration test
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/util/PropUtils.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/util/PropUtils.java 2009-11-25 14:17:42 UTC (rev 1589)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/util/PropUtils.java 2009-11-25 14:18:01 UTC (rev 1590)
@@ -11,14 +11,13 @@
public static Properties loadProperties(String filename, Properties defaults) {
- Properties props = null;
+ InputStream in = null;
+ Properties props = new Properties();
if (defaults != null) {
- props = new Properties(defaults);
- } else {
- props = new Properties();
- }
+ props.putAll(defaults);
+ }
try {
- InputStream in = ConfigPropertyLoader.class.getResourceAsStream(filename);
+ in = ConfigPropertyLoader.class.getResourceAsStream(filename);
if (in != null) {
Properties lprops = new Properties();
lprops.load(in);
@@ -30,6 +29,12 @@
}
} catch (IOException e) {
throw new RuntimeException("Error loading properties from file '"+filename+ "'" + e.getMessage());
+ } finally {
+ try {
+ in.close();
+ } catch(Exception e){
+
+ }
}
return props;
16 years