You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2008/04/15 00:43:29 UTC

svn commit: r648041 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/savepointJdbc30_XA.out tests/jdbcapi/SavepointJdbc30Test.java

Author: kmarsden
Date: Mon Apr 14 15:43:08 2008
New Revision: 648041

URL: http://svn.apache.org/viewvc?rev=648041&view=rev
Log:
DERBY-3568  Convert jdbcapi/savepointJdbc30_JSR169.java and jdbcapi/savepointJdbc30_XA.java to JUnit

Add client xa testing.
Contributed by Erlend Birkenes (erlend at birkenes dot net)

Kathey  fixed indentation and added Apache header

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SavepointJdbc30Test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SavepointJdbc30Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SavepointJdbc30Test.java?rev=648041&r1=648040&r2=648041&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SavepointJdbc30Test.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SavepointJdbc30Test.java Mon Apr 14 15:43:08 2008
@@ -1,3 +1,22 @@
+/*
+ *
+ * Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi/SavepointJdbc30Test
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ */
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
 
 import java.lang.reflect.Method;
@@ -57,14 +76,20 @@
 
         // Repeat the embedded tests obtaining a connection from
         // an XA data source if it is supported. This is not supported
-        // under JSR169
+        // under JSR169.
         if (JDBC.vmSupportsJDBC3()) {
-        	embedded = new TestSuite(
-        	"SavepointJdbc30_JSR169Test:embedded XADataSource");
-        	embedded.addTestSuite(SavepointJdbc30Test.class);
-        	embedded.addTest(getEmbeddedSuite("SavepointJdbc30_JSR169Test:"
+            embedded = new TestSuite(
+            "SavepointJdbc30_JSR169Test:embedded XADataSource");
+            embedded.addTestSuite(SavepointJdbc30Test.class);
+            embedded.addTest(getEmbeddedSuite("SavepointJdbc30_JSR169Test:"
         			+ "embedded only XADataSource"));
-        	suite.addTest(TestConfiguration.connectionXADecorator(embedded));
+            suite.addTest(TestConfiguration.connectionXADecorator(embedded));
+            //        	 Repeat the client tests obtaining a connection from
+            // an XA data source if it is supported. This is not supported
+            // under JSR169.
+            client = new TestSuite("SavepointJdbc30_JSR169Test:client XADatasource");
+            client.addTestSuite(SavepointJdbc30Test.class);
+            suite.addTest(TestConfiguration.clientServerDecorator(TestConfiguration.connectionXADecorator(client)));        	
         }	
         // return suite;
         return new CleanDatabaseTestSetup(suite) {