[jboss-cvs] JBossAS SVN: r58660 - in branches/JBoss_4_0_2_CP/testsuite: . src/main/org/jboss/test/cmp2/dbschema/relationship src/main/org/jboss/test/cmp2/dbschema/util
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 22 11:15:25 EST 2006
Author: jaroslaw.kijanowski
Date: 2006-11-22 11:15:24 -0500 (Wed, 22 Nov 2006)
New Revision: 58660
Added:
branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTest.java
Removed:
branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTestCase.java
Modified:
branches/JBoss_4_0_2_CP/testsuite/build.xml
branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/relationship/RelationshipSchemaUnitTestCase.java
Log:
repaired matrix compatibility tests
Modified: branches/JBoss_4_0_2_CP/testsuite/build.xml
===================================================================
--- branches/JBoss_4_0_2_CP/testsuite/build.xml 2006-11-21 21:07:53 UTC (rev 58659)
+++ branches/JBoss_4_0_2_CP/testsuite/build.xml 2006-11-22 16:15:24 UTC (rev 58660)
@@ -2859,7 +2859,7 @@
<pathelement location="${build.classes}"/>
<pathelement location="${build.resources}"/>
<fileset dir="${current-version-dir}" includes="*.jar"/>
- <path refid="library.classpath" />
+ <path refid="thirdparty.classpath" />
</classpath>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
usefile="${junit.formatter.usefile}"
Modified: branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/relationship/RelationshipSchemaUnitTestCase.java
===================================================================
--- branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/relationship/RelationshipSchemaUnitTestCase.java 2006-11-21 21:07:53 UTC (rev 58659)
+++ branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/relationship/RelationshipSchemaUnitTestCase.java 2006-11-22 16:15:24 UTC (rev 58660)
@@ -9,7 +9,7 @@
import junit.framework.Test;
import org.jboss.test.JBossTestCase;
import org.jboss.test.cmp2.dbschema.util.DBSchemaHelper;
-import org.jboss.test.cmp2.dbschema.util.AbstractDBSchemaTestCase;
+import org.jboss.test.cmp2.dbschema.util.AbstractDBSchemaTest;
import org.jboss.test.cmp2.dbschema.util.Column;
import org.jboss.test.cmp2.dbschema.util.Table;
@@ -25,7 +25,7 @@
* @author <a href="mailto:alex at jboss.org">Alex Loubyansky</a>
*/
public class RelationshipSchemaUnitTestCase
- extends AbstractDBSchemaTestCase
+ extends AbstractDBSchemaTest
{
public static Test suite() throws Exception
{
Added: branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTest.java
===================================================================
--- branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTest.java 2006-11-21 21:07:53 UTC (rev 58659)
+++ branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTest.java 2006-11-22 16:15:24 UTC (rev 58660)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.test.cmp2.dbschema.util;
+
+import net.sourceforge.junitejb.EJBTestCase;
+
+import javax.sql.DataSource;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+
+/**
+ *
+ * @author <a href="mailto:alex at jboss.org">Alex Loubyansky</a>
+ */
+public class AbstractDBSchemaTest
+ extends EJBTestCase
+{
+ protected String datasourceName = "java:/DefaultDS";
+ protected DataSource datasource;
+
+ public AbstractDBSchemaTest(String s)
+ {
+ super(s);
+ }
+
+ protected Connection getConnection()
+ throws NamingException, SQLException
+ {
+ return getDataSource().getConnection();
+ }
+
+ protected DataSource getDataSource() throws NamingException
+ {
+ if(datasource == null)
+ {
+ datasource = getDataSource(datasourceName);
+ }
+ return datasource;
+ }
+
+ protected DataSource getDataSource(String datasource) throws NamingException
+ {
+ InitialContext ic = null;
+ try
+ {
+ ic = new InitialContext();
+ return (DataSource)ic.lookup(datasource);
+ }
+ finally
+ {
+ if(ic != null)
+ try
+ {
+ ic.close();
+ }
+ catch(Exception ignore){}
+ }
+ }
+}
Deleted: branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTestCase.java
===================================================================
--- branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTestCase.java 2006-11-21 21:07:53 UTC (rev 58659)
+++ branches/JBoss_4_0_2_CP/testsuite/src/main/org/jboss/test/cmp2/dbschema/util/AbstractDBSchemaTestCase.java 2006-11-22 16:15:24 UTC (rev 58660)
@@ -1,66 +0,0 @@
-/*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.test.cmp2.dbschema.util;
-
-import net.sourceforge.junitejb.EJBTestCase;
-
-import javax.sql.DataSource;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.sql.Connection;
-import java.sql.SQLException;
-
-
-/**
- *
- * @author <a href="mailto:alex at jboss.org">Alex Loubyansky</a>
- */
-public class AbstractDBSchemaTestCase
- extends EJBTestCase
-{
- protected String datasourceName = "java:/DefaultDS";
- protected DataSource datasource;
-
- public AbstractDBSchemaTestCase(String s)
- {
- super(s);
- }
-
- protected Connection getConnection()
- throws NamingException, SQLException
- {
- return getDataSource().getConnection();
- }
-
- protected DataSource getDataSource() throws NamingException
- {
- if(datasource == null)
- {
- datasource = getDataSource(datasourceName);
- }
- return datasource;
- }
-
- protected DataSource getDataSource(String datasource) throws NamingException
- {
- InitialContext ic = null;
- try
- {
- ic = new InitialContext();
- return (DataSource)ic.lookup(datasource);
- }
- finally
- {
- if(ic != null)
- try
- {
- ic.close();
- }
- catch(Exception ignore){}
- }
- }
-}
More information about the jboss-cvs-commits
mailing list