Index: Main.java
===================================================================
RCS file: /scm/castor/castor/src/tests/Main.java,v
retrieving revision 1.2
diff -u -r1.2 Main.java
--- Main.java 13 Feb 2004 21:28:43 -0000 1.2
+++ Main.java 17 Mar 2005 21:17:35 -0000
@@ -96,6 +96,9 @@
*/
private String testRes;
+ public Main() {
+ super(null,"Castor","Root");
+ }
/**
* Constructor
*/
Index: log4j.xml
===================================================================
RCS file: /scm/castor/castor/src/tests/log4j.xml,v
retrieving revision 1.6
diff -u -r1.6 log4j.xml
--- log4j.xml 5 Mar 2005 13:41:59 -0000 1.6
+++ log4j.xml 17 Mar 2005 21:17:36 -0000
@@ -5,7 +5,7 @@
-
+
@@ -14,11 +14,15 @@
-
+
+
+
+
+
Index: tests.xml
===================================================================
RCS file: /scm/castor/castor/src/tests/tests.xml,v
retrieving revision 1.17
diff -u -r1.17 tests.xml
--- tests.xml 9 Mar 2005 20:43:16 -0000 1.17
+++ tests.xml 17 Mar 2005 21:17:36 -0000
@@ -121,7 +121,9 @@
-
+
@@ -315,14 +317,6 @@
-
-
-
- JDO tests in a J2EE transaction managed environment
-
-
-
-
Index: jdo/Deadlock.java
===================================================================
RCS file: /scm/castor/castor/src/tests/jdo/Deadlock.java,v
retrieving revision 1.4
diff -u -r1.4 Deadlock.java
--- jdo/Deadlock.java 5 Mar 2005 13:42:01 -0000 1.4
+++ jdo/Deadlock.java 17 Mar 2005 21:17:37 -0000
@@ -47,8 +47,14 @@
package jdo;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
import java.util.Enumeration;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.exolab.castor.jdo.Database;
+import org.exolab.castor.jdo.JDO;
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.PersistenceException;
import org.exolab.castor.jdo.LockNotGrantedException;
@@ -121,8 +127,27 @@
private Exception _secondProblem;
+
+ private static final Log log = LogFactory.getLog (Deadlock.class);
/**
+ * Creates an instance of this class.
+ * @param name Name of the JUnit test case
+ * @throws Exception If a problem has been encountered.
+ */
+ public Deadlock (String name) throws Exception {
+ super (name);
+ String jdoConf = getClass().getResource("mysql.xml").toString();
+ JDO jdo = new JDO();
+ jdo.setDatabaseName("mysql");
+ jdo.setConfiguration(jdoConf);
+ JDO.loadConfiguration(jdoConf);
+
+ setVerboseStream (new PrintStream (new FileOutputStream("xxx.log")));
+ this._category = new JDOCategory (null, "TC06", "xxx", jdo);
+ }
+
+ /**
* Constructor
*
* @param category The test suit of these test cases
@@ -253,6 +278,14 @@
if ( _secondDb.isActive() ) _secondDb.rollback();
_secondDb.close();
}
+
+ public void testXXX() throws Exception {
+ runTest();
+ }
+
+ public static void main (String[] args) {
+ junit.textui.TestRunner.run (Deadlock.class);
+ }
private class FirstThread extends Thread {
@@ -328,6 +361,7 @@
CastorTestCase.stream.println( "1.6: Committed" );
_resultOk = true;
} catch ( Exception except ) {
+ log.error ("Problem in FirstThread", except);
_theTest._firstProblem = except;
CastorTestCase.stream.println( "1.X: " + except );
} finally {
Index: jdo/ManyToMany.java
===================================================================
RCS file: /scm/castor/castor/src/tests/jdo/ManyToMany.java,v
retrieving revision 1.4
diff -u -r1.4 ManyToMany.java
--- jdo/ManyToMany.java 5 Mar 2005 13:42:01 -0000 1.4
+++ jdo/ManyToMany.java 17 Mar 2005 21:17:38 -0000
@@ -47,12 +47,17 @@
package jdo;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
import java.util.Iterator;
import java.util.Collection;
import org.exolab.castor.jdo.Database;
+import org.exolab.castor.jdo.JDO;
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.QueryResults;
import org.exolab.castor.jdo.PersistenceException;
+import org.exolab.castor.mapping.Mapping;
+
import java.util.ArrayList;
import harness.TestHarness;
@@ -79,7 +84,18 @@
_category = (JDOCategory) category;
}
-
+ public ManyToMany (String name) throws Exception {
+ super (name);
+ String jdoConf = getClass().getResource("mysql.xml").toString();
+ JDO jdo = new JDO();
+ jdo.setDatabaseName("mysql");
+ jdo.setConfiguration(jdoConf);
+ jdo.loadConfiguration(jdoConf);
+
+ setVerboseStream (new PrintStream (new FileOutputStream("xxx.log")));
+ _category = new JDOCategory (null, "TC23", "xxx", jdo);
+ }
+
public void setUp()
throws PersistenceException {
_db = _category.getDatabase();
@@ -543,6 +559,14 @@
throws PersistenceException {
if ( _db.isActive() ) _db.rollback();
_db.close();
+ }
+
+ public void testXXX() throws Exception {
+ runTest();
+ }
+
+ public static void main (String[] args) {
+ junit.textui.TestRunner.run (ManyToMany.class);
}
}
Index: jdo/OqlExtends.java
===================================================================
RCS file: /scm/castor/castor/src/tests/jdo/OqlExtends.java,v
retrieving revision 1.3
diff -u -r1.3 OqlExtends.java
--- jdo/OqlExtends.java 5 Oct 2004 22:26:41 -0000 1.3
+++ jdo/OqlExtends.java 17 Mar 2005 21:17:38 -0000
@@ -50,11 +50,14 @@
import harness.CastorTestCase;
import harness.TestHarness;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import org.exolab.castor.jdo.Database;
+import org.exolab.castor.jdo.JDO;
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.PersistenceException;
import org.exolab.castor.jdo.QueryResults;
@@ -68,10 +71,22 @@
private JDOCategory _category;
private Database _db;
-
+
+ public OqlExtends (String name) throws Exception {
+ super (name);
+ String jdoConf = getClass().getResource("mysql.xml").toString();
+ JDO jdo = new JDO();
+ jdo.setDatabaseName("mysql");
+ jdo.setConfiguration(jdoConf);
+ JDO.loadConfiguration(jdoConf);
+
+ setVerboseStream (new PrintStream (new FileOutputStream("xxx.log")));
+ this._category = new JDOCategory (null, "TC47", "xxx", jdo);
+ }
+
public OqlExtends( TestHarness category ) {
super( category, "TC30", "OQL queries for extends" );
- _category = (JDOCategory) category;
+ this._category = (JDOCategory) category;
}
public void setUp()
@@ -237,4 +252,13 @@
if ( _db.isActive() ) _db.rollback();
_db.close();
}
+
+ public void testXXX() throws Exception {
+ runTest();
+ }
+
+ public static void main (String[] args) {
+ junit.textui.TestRunner.run (OqlExtends.class);
+ }
+
}
Index: jdo/Persistent.java
===================================================================
RCS file: /scm/castor/castor/src/tests/jdo/Persistent.java,v
retrieving revision 1.3
diff -u -r1.3 Persistent.java
--- jdo/Persistent.java 5 Mar 2005 13:42:01 -0000 1.3
+++ jdo/Persistent.java 17 Mar 2005 21:17:39 -0000
@@ -47,7 +47,11 @@
package jdo;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
import org.exolab.castor.jdo.Database;
+import org.exolab.castor.jdo.JDO;
import org.exolab.castor.jdo.QueryResults;
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.PersistenceException;
@@ -67,6 +71,18 @@
private Database _db;
+ public Persistent (String name) throws Exception {
+ super (name);
+ String jdoConf = getClass().getResource("mysql.xml").toString();
+ JDO jdo = new JDO();
+ jdo.setDatabaseName("mysql");
+ jdo.setConfiguration(jdoConf);
+ jdo.loadConfiguration(jdoConf);
+
+ setVerboseStream (new PrintStream (new FileOutputStream("xxx.log")));
+ _category = new JDOCategory (null, "TC47", "xxx", jdo);
+ }
+
public Persistent( TestHarness category ) {
super( category, "TC47", "Persistence interface tests" );
_category = (JDOCategory) category;
@@ -238,6 +254,14 @@
throws PersistenceException {
if ( _db.isActive() ) _db.rollback();
_db.close();
+ }
+
+ public void testXXX() throws Exception {
+ runTest();
+ }
+
+ public static void main (String[] args) {
+ junit.textui.TestRunner.run (Persistent.class);
}
}
Index: jdo/mapping.xml
===================================================================
RCS file: /scm/castor/castor/src/tests/jdo/mapping.xml,v
retrieving revision 1.10
diff -u -r1.10 mapping.xml
--- jdo/mapping.xml 5 Dec 2004 11:00:39 -0000 1.10
+++ jdo/mapping.xml 17 Mar 2005 21:17:40 -0000
@@ -943,7 +943,7 @@
-
+
@@ -955,7 +955,7 @@
Test Persistent interface handling
-
+