Author: vhalbert(a)redhat.com
Date: 2009-09-21 17:40:45 -0400 (Mon, 21 Sep 2009)
New Revision: 1444
Removed:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDriverFalseOffTest.java
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/framework/datasource/TwoDataSourceSetup.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverFalseOffTest.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverTrueOffTest.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionScenarios.java
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDatasourceFalseOffTest.java
Log:
Teiid 773 - setting up the xa transaction tests
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/framework/datasource/TwoDataSourceSetup.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/framework/datasource/TwoDataSourceSetup.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/framework/datasource/TwoDataSourceSetup.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -19,11 +19,10 @@
@Override
- public void setup() throws Exception {
- // NOTE: dont close the connections here because in most cases they are reused
- // to validate the results
- // The connections will be closed at teardown
-
+ public void setup() throws Exception {
+ // NOTE: dont close the connections here because in most cases they are reused
+ // to validate the results
+ // The connections will be closed at teardown
System.out.println("Run TwoSource Setup...");
@@ -55,9 +54,7 @@
test1.assertRowCount(100);
test1.execute("select * from g2 ");
test1.assertRowCount(100);
-
- test1.closeConnection();
-
+
AbstractQueryTest test2 = new
QueryExecution(ConnectionUtil.getSource("pm2")); //$NON-NLS-1$
test2.execute("delete from g2"); //$NON-NLS-1$
test2.execute("delete from g1"); //$NON-NLS-1$
@@ -86,11 +83,9 @@
test2.execute("select * from g2 ");
test2.assertRowCount(100);
- test2.closeConnection();
- System.out.println("TwoSource Setup Completed");
+ System.out.println("TwoSource Setup Completed");
+
-
-
}
@Override
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverFalseOffTest.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverFalseOffTest.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverFalseOffTest.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -29,7 +29,6 @@
System.setProperty(ConfigPropertyNames.CONNECTION_TYPE,
ConfigPropertyNames.CONNECTION_TYPES.DRIVER_CONNECTION);
System.setProperty(ConnectionStrategy.AUTOCOMMIT, "false");
System.setProperty(ConnectionStrategy.TXN_AUTO_WRAP, "off");
- // System.setProperty(ConnectionStrategy.FETCH_SIZE, "20");
}
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverTrueOffTest.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverTrueOffTest.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/LocalTransactionDriverTrueOffTest.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -29,7 +29,6 @@
System.setProperty(ConfigPropertyNames.CONNECTION_TYPE,
ConfigPropertyNames.CONNECTION_TYPES.DRIVER_CONNECTION);
System.setProperty(ConnectionStrategy.AUTOCOMMIT, "true");
System.setProperty(ConnectionStrategy.TXN_AUTO_WRAP, "off");
- // System.setProperty(ConnectionStrategy.FETCH_SIZE, "true");
}
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionScenarios.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionScenarios.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/TwoSourceTransactionScenarios.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -199,7 +199,7 @@
test.execute("select * from g1 where e1 >= 100 and e1 <
112");
test.assertRowCount(12);
test.execute("select * from g2 where e1 >= 100 and e1 <
112");
- test.assertRowCount(12);
+ test.assertRowCount(0);
test.closeConnection();
}
@@ -685,8 +685,12 @@
if (!exceptionOccurred()) {
fail("should have failed with time out exception");
}
- else {
- assertTrue(getLastException().getMessage().indexOf("Operation
timed out before completion") != -1);
+ else if (getLastException() != null){
+ if (getLastException().getMessage().indexOf("Operation timed out
before completion") != -1) {
+ assertTrue(false);
+ }
+ } else {
+ fail("The expected exception was not saved.");
}
}
Modified:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDatasourceFalseOffTest.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDatasourceFalseOffTest.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDatasourceFalseOffTest.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -31,7 +31,6 @@
System.setProperty(ConfigPropertyNames.CONNECTION_TYPE,
ConfigPropertyNames.CONNECTION_TYPES.DATASOURCE_CONNECTION);
System.setProperty(ConnectionStrategy.AUTOCOMMIT, "false");
System.setProperty(ConnectionStrategy.TXN_AUTO_WRAP, "off");
- // System.setProperty(ConnectionStrategy.FETCH_SIZE, "true");
}
Deleted:
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDriverFalseOffTest.java
===================================================================
---
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDriverFalseOffTest.java 2009-09-21
21:29:36 UTC (rev 1443)
+++
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/XATransactionDriverFalseOffTest.java 2009-09-21
21:40:45 UTC (rev 1444)
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000-2007 MetaMatrix, Inc.
- * All rights reserved.
- */
-package org.teiid.test.testcases;
-
-import org.teiid.test.framework.ConfigPropertyNames;
-import org.teiid.test.framework.connection.ConnectionStrategy;
-
-
-/**
- * Local Transaction Test
- *
- * Settings:
- *
- * - Transaction Type = local
- * - Using Driver
- * - Autocommit = True
- * - TxnAutoWrap = Off
- */
-public class XATransactionDriverFalseOffTest extends TwoSourceTransactionScenarios {
-
- public XATransactionDriverFalseOffTest(String name) {
- super(name);
- }
-
- @Override
- protected void setUp() throws Exception {
- System.setProperty(ConfigPropertyNames.CONFIG_FILE,
"xa-conig.properties");
-
- System.setProperty(ConfigPropertyNames.CONNECTION_TYPE,
ConfigPropertyNames.CONNECTION_TYPES.DATASOURCE_CONNECTION);
- System.setProperty(ConnectionStrategy.AUTOCOMMIT, "true");
- System.setProperty(ConnectionStrategy.TXN_AUTO_WRAP, "off");
- // System.setProperty(ConnectionStrategy.FETCH_SIZE, "true");
-
-
- }
-
-
-
-}
Show replies by date