db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r538818 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: XATransactionTest.java _Suite.java
Date Thu, 17 May 2007 06:37:33 GMT
Author: kahatlen
Date: Wed May 16 23:37:32 2007
New Revision: 538818

URL: http://svn.apache.org/viewvc?view=rev&rev=538818
Log:
DERBY-2551: Disable XATransactionTest in J2ME

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java?view=diff&rev=538818&r1=538817&r2=538818
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
Wed May 16 23:37:32 2007
@@ -34,6 +34,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.derby.client.ClientXid;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.J2EEDataSource;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.TestConfiguration;
@@ -174,12 +175,11 @@
     }
 
     public static Test suite() {
-        Test test;
-        TestSuite suite = new TestSuite("XATransactionTest");
-
-        test = TestConfiguration.defaultSuite(XATransactionTest.class);
-        suite.addTest(test);
+        // the test requires XADataSource to run
+        if (JDBC.vmSupportsJDBC3()) {
+            return TestConfiguration.defaultSuite(XATransactionTest.class);
+        }
 
-        return suite;
+        return new TestSuite("XATransactionTest cannot run without XA support");
     }
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java?view=diff&rev=538818&r1=538817&r2=538818
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
Wed May 16 23:37:32 2007
@@ -74,7 +74,6 @@
 		suite.addTest(ClosedObjectTest.suite());
 		suite.addTest(SetTransactionIsolationTest.suite());
 		suite.addTest(AuthenticationTest.suite());
-		suite.addTest(XATransactionTest.suite());
 		suite.addTest(DriverTest.suite());
         
         // Old harness .java tests that run using the HarnessJavaTest
@@ -102,6 +101,7 @@
             // Tests uses JDBC 3.0 datasources
             suite.addTest(PoolDSAuthenticationTest.suite());
             suite.addTest(XADSAuthenticationTest.suite());
+            suite.addTest(XATransactionTest.suite());
 
             // Test uses JDBC 3.0 datasources, and javax.naming.Reference etc.
             suite.addTest(DataSourceReferenceTest.suite());



Mime
View raw message