db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/odmg UserTestCases.java
Date Mon, 12 Jul 2004 16:26:27 GMT
arminw      2004/07/12 09:26:27

  Modified:    src/test/org/apache/ojb/broker AutomaticForeignKeys.java
                        OptimisticLockingTest.java PathTest.java
                        PolymorphicExtents.java ProductGroupProxy.java
                        ProxyExamples.java QueryTest.java
               src/test/org/apache/ojb/junit JUnitExtensions.java
               src/test/org/apache/ojb/odmg UserTestCases.java
  Log:
  update tests
  remove System.out.println
  
  Revision  Changes    Path
  1.9       +0 -2      db-ojb/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java
  
  Index: AutomaticForeignKeys.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/AutomaticForeignKeys.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AutomaticForeignKeys.java	31 May 2004 22:57:21 -0000	1.8
  +++ AutomaticForeignKeys.java	12 Jul 2004 16:26:26 -0000	1.9
  @@ -52,7 +52,6 @@
   		}
   		catch (Throwable t)
   		{
  -			System.out.println(t.getMessage());
   			t.printStackTrace();
   			fail(t.getMessage());
   		}
  @@ -100,7 +99,6 @@
   		}
   		catch (Throwable t)
   		{
  -			System.out.println(t.getMessage());
   			t.printStackTrace();
   			fail(t.getMessage());
   		}
  
  
  
  1.11      +0 -1      db-ojb/src/test/org/apache/ojb/broker/OptimisticLockingTest.java
  
  Index: OptimisticLockingTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/OptimisticLockingTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- OptimisticLockingTest.java	31 May 2004 22:57:21 -0000	1.10
  +++ OptimisticLockingTest.java	12 Jul 2004 16:26:26 -0000	1.11
  @@ -168,7 +168,6 @@
              // 
              // fail("If an object which use optimistic locking was deleted two times, OJB"
+
              //         " should not throw an optimistic locking exception: "+e.getMessage());
  -           System.out.println(e.getMessage()); 
              return;
           }
           fail("Should throw an Optimistic Lock exception");
  
  
  
  1.5       +111 -60   db-ojb/src/test/org/apache/ojb/broker/PathTest.java
  
  Index: PathTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PathTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PathTest.java	25 Jun 2004 15:58:39 -0000	1.4
  +++ PathTest.java	12 Jul 2004 16:26:26 -0000	1.5
  @@ -9,20 +9,24 @@
   import java.util.Collection;
   import java.util.Iterator;
   
  -import junit.framework.TestCase;
  +import org.apache.commons.lang.SystemUtils;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
   import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.broker.query.UserAlias;
  +import org.apache.ojb.junit.PBTestCase;
   
  -public class PathTest extends TestCase
  +public class PathTest extends PBTestCase
   {
  +    // set true to enable test output
  +    private static boolean PRINT_TESTINFO = false;
  +    private StringBuffer output;
  +    private static String eol = SystemUtils.LINE_SEPARATOR;
   
       private static Class CLASS = PathTest.class;
  -    private int COUNT = 10;
  -    private int id_filter = 10000;
  -    private PersistenceBroker broker = null;
  +    // private int COUNT = 10;
  +    // private int id_filter = 10000;
   
       public static void main(String[] args)
       {
  @@ -30,28 +34,16 @@
           junit.textui.TestRunner.main(arr);
       }
   
  -    /**
  -     * Insert the method's description here.
  -     * Creation date: (06.12.2000 21:58:53)
  -     */
  -    public void setUp()
  +    public void setUp() throws Exception
       {
  -        try
  -        {
  -            broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  -        }
  -        catch (PBFactoryException e)
  -        {
  -        }
  +        super.setUp();
  +        output = new StringBuffer();
       }
   
  -    /**
  -     * Insert the method's description here.
  -     * Creation date: (06.12.2000 21:59:14)
  -     */
  -    public void tearDown()
  +    public void tearDown() throws Exception
       {
  -        broker.close();
  +        super.tearDown();
  +        if(PRINT_TESTINFO) System.out.println(output.toString());
       }
   
       public PathTest(String name)
  @@ -116,13 +108,13 @@
           {
               A a = new A(A_OFFSET + A_OFFSET * ia);
               broker.store(a);
  -            System.out.println("A - " + a.getAAttrib());
  +            output.append(eol +"A - " + a.getAAttrib());
               for (int ib = 0; ib < NUM_B_PER_A; ib++)
               {
                   B b = new B(A_OFFSET + B_OFFSET * ib);
                   b.setA(a);
                   broker.store(b);
  -                System.out.println("\tB - " + b.getBAttrib());
  +                output.append(eol +"\tB - " + b.getBAttrib());
                   for (int ic = 0; ic < NUM_C_PER_B; ic++)
                   {
                       C c = new C(A_OFFSET + B_OFFSET * ib + C_OFFSET * ic);
  @@ -133,8 +125,8 @@
                           c.setD(d);
                           broker.store(d);
                           broker.store(c);
  -                        System.out.println("\t\tC - " + c.getCAttrib());
  -                        System.out.println("\t\t\tD - " + d.getDAttrib());
  +                        output.append(eol +"\t\tC - " + c.getCAttrib());
  +                        output.append(eol +"\t\t\tD - " + d.getDAttrib());
                       }
                   }
                   for (int ic = 0; ic < NUM_C1_PER_B; ic++)
  @@ -148,8 +140,8 @@
                           c1.setC1Attrib(c1.getCAttrib() + 1);
                           broker.store(d);
                           broker.store(c1);
  -                        System.out.println("\t\tC1 - " + c1.getC1Attrib());
  -                        System.out.println("\t\t\tD - " + d.getDAttrib());
  +                        output.append(eol +"\t\tC1 - " + c1.getC1Attrib());
  +                        output.append(eol +"\t\t\tD - " + d.getDAttrib());
                       }
                   }
               }
  @@ -236,7 +228,7 @@
   	 */
   	public void testPathClassOnSegment1() throws Exception
   	{
  -		try
  +        try
   		{
   			// c1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -250,11 +242,11 @@
   			java.util.Iterator itr = allBs.iterator();
   
   			assertEquals(1 * NUM_A, allBs.size());
  -			System.out.println("testPathClassOnSegment1() iteration size:" + allBs.size());
  +			output.append(eol +"testPathClassOnSegment1() iteration size:" + allBs.size());
   			while (itr.hasNext())
   			{
   				B b = (B) itr.next();
  -				System.out.println("Found B:  " + b.getId() + " " + b.getBAttrib());
  +				output.append(eol +"Found B:  " + b.getId() + " " + b.getBAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -270,7 +262,7 @@
   	 */
   	public void testPathClassOnSegment2() throws Exception
   	{
  -		try
  +        try
   		{
   			// c1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -284,11 +276,11 @@
   			java.util.Iterator itr = allAs.iterator();
   
   			assertEquals(allAs.size(), 1 * NUM_A);
  -			System.out.println("testPathClassOnSegment2() iteration size:" + allAs.size());
  +			output.append(eol +"testPathClassOnSegment2() iteration size:" + allAs.size());
   			while (itr.hasNext())
   			{
   				A a = (A) itr.next();
  -				System.out.println("Found A:  " + a.getId() + " " + a.getAAttrib());
  +				output.append(eol +"Found A:  " + a.getId() + " " + a.getAAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -304,7 +296,7 @@
   	 */
   	public void testSingleAlias() throws Exception
   	{
  -		try
  +        try
   		{
   			// d1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -319,11 +311,11 @@
   			java.util.Iterator itr = allBs.iterator();
   
   			assertEquals(2 * NUM_A, allBs.size());
  -			System.out.println("testSingleAlias() iteration size:" + allBs.size());
  +			output.append(eol +"testSingleAlias() iteration size:" + allBs.size());
   			while (itr.hasNext())
   			{
   				B b = (B) itr.next();
  -				System.out.println("Found B:  " + b.getId() + " " + b.getBAttrib());
  +				output.append(eol +"Found B:  " + b.getId() + " " + b.getBAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -339,7 +331,7 @@
   	 */
   	public void testTwoAliasesTwoSegments() throws Exception
   	{
  -		try
  +        try
   		{
   			// d1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -357,14 +349,14 @@
   
   			Collection allBs = broker.getCollectionByQuery(query);
   
  -			java.util.Iterator itr = allBs.iterator();
  +			Iterator itr = allBs.iterator();
   
   			assertEquals(4 * NUM_A, allBs.size());
  -			System.out.println("testTwoAliasesTwoSegments() iteration size:" + allBs.size());
  +			output.append(eol +"testTwoAliasesTwoSegments() iteration size:" + allBs.size());
   			while (itr.hasNext())
   			{
   				B b = (B) itr.next();
  -				System.out.println("Found B:  " + b.getId() + " " + b.getBAttrib());
  +				output.append(eol +"Found B:  " + b.getId() + " " + b.getBAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -380,7 +372,7 @@
   	 */
   	public void testTwoAliasesThreeSegments() throws Exception
   	{
  -		try
  +        try
   		{
   			// d1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -394,7 +386,6 @@
   
   			crit1.addAndCriteria(crit2);
   
  -			boolean isDistinct = true;
   			Query query = new QueryByCriteria(A.class, crit1, true);
   
   			Collection allAs = broker.getCollectionByQuery(query);
  @@ -402,11 +393,11 @@
   			java.util.Iterator itr = allAs.iterator();
   
   			assertEquals(1 * NUM_A, allAs.size());
  -			System.out.println("testTwoAliasesThreeSegments() iteration size:" + allAs.size());
  +			output.append(eol +"testTwoAliasesThreeSegments() iteration size:" + allAs.size());
   			while (itr.hasNext())
   			{
   				A a = (A) itr.next();
  -				System.out.println("Found A:  " + a.getId() + " " + a.getAAttrib());
  +				output.append(eol +"Found A:  " + a.getId() + " " + a.getAAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -444,11 +435,11 @@
               java.util.Iterator itr = allBs.iterator();
   
               assertEquals(1 * NUM_A, allBs.size());
  -            System.out.println("testPathClassPerCriteria() iteration size:" + allBs.size());
  +            output.append(eol +"testPathClassPerCriteria() iteration size:" + allBs.size());
               while (itr.hasNext())
               {
                   B b = (B) itr.next();
  -                System.out.println("Found B:  " + b.getId() + " " + b.getBAttrib());
  +                output.append(eol +"Found B:  " + b.getId() + " " + b.getBAttrib());
               }
           }
           catch (Throwable t)
  @@ -464,7 +455,7 @@
   	 */
   	public void testPathClassPerQuery() throws Exception
   	{
  -		try
  +        try
   		{
   			// c1_a criteria 
   			Criteria crit1 = new Criteria();
  @@ -488,11 +479,11 @@
   			java.util.Iterator itr = allBs.iterator();
   
   			assertEquals(1 * NUM_A, allBs.size());
  -			System.out.println("testPathClassPerQuery() iteration size:" + allBs.size());
  +			output.append(eol +"testPathClassPerQuery() iteration size:" + allBs.size());
   			while (itr.hasNext())
   			{
   				B b = (B) itr.next();
  -				System.out.println("Found B:  " + b.getId() + " " + b.getBAttrib());
  +				output.append(eol +"Found B:  " + b.getId() + " " + b.getBAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -508,7 +499,7 @@
   	 */
   	public void testThreeSegmentsAliasOnSegment2And3() throws Exception
   	{
  -		try
  +        try
   		{
   			// d1 criteria 
   			Criteria crit1 = new Criteria();
  @@ -530,11 +521,11 @@
   			java.util.Iterator itr = allAs.iterator();
   
   			assertEquals(1 * NUM_A, allAs.size());
  -			System.out.println("testThreeSegmentsAliasOnSegment2And3() iteration size:" + allAs.size());
  +			output.append(eol +"testThreeSegmentsAliasOnSegment2And3() iteration size:" + allAs.size());
   			while (itr.hasNext())
   			{
   				A a = (A) itr.next();
  -				System.out.println("Found A:  " + a.getId() + " " + a.getAAttrib());
  +				output.append(eol +"Found A:  " + a.getId() + " " + a.getAAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -549,7 +540,7 @@
   	 */
   	public void testThreeSegmentsAliasOnSegment2And3UserAlias() throws Exception
   	{
  -		try
  +        try
   		{
   			UserAlias userAlias1 = new UserAlias("alias1");
   			userAlias1.add("bSet.cSet");
  @@ -579,11 +570,11 @@
   			java.util.Iterator itr = allAs.iterator();
   
   			assertEquals(1 * NUM_A, allAs.size());
  -			System.out.println("testThreeSegmentsAliasOnSegment2And3UserAlias() iteration size:"
+ allAs.size());
  +			output.append(eol +"testThreeSegmentsAliasOnSegment2And3UserAlias() iteration size:"
+ allAs.size());
   			while (itr.hasNext())
   			{
   				A a = (A) itr.next();
  -				System.out.println("Found A:  " + a.getId() + " " + a.getAAttrib());
  +				output.append(eol +"Found A:  " + a.getId() + " " + a.getAAttrib());
   			}
   		}
   		catch (Throwable t)
  @@ -615,7 +606,7 @@
   		while (itr.hasNext())
   		{
   			A a = (A) itr.next();
  -			System.out.println("Found A:  " + a.getId() + " " + a.getAAttrib());
  +			output.append(eol +"Found A:  " + a.getId() + " " + a.getAAttrib());
   		}
       }
   	
  @@ -726,6 +717,36 @@
               this.cSet = new ArrayList();
           }
   
  +        public long getaId()
  +        {
  +            return aId;
  +        }
  +
  +        public void setaId(long aId)
  +        {
  +            this.aId = aId;
  +        }
  +
  +        public int getbAttrib()
  +        {
  +            return bAttrib;
  +        }
  +
  +        public void setbAttrib(int bAttrib)
  +        {
  +            this.bAttrib = bAttrib;
  +        }
  +
  +        public Collection getcSet()
  +        {
  +            return cSet;
  +        }
  +
  +        public void setcSet(Collection cSet)
  +        {
  +            this.cSet = cSet;
  +        }
  +
           /**
            * @return
            */
  @@ -811,6 +832,36 @@
               this.cAttrib = cAttrib;
           }
   
  +        public long getbId()
  +        {
  +            return bId;
  +        }
  +
  +        public void setbId(long bId)
  +        {
  +            this.bId = bId;
  +        }
  +
  +        public long getdId()
  +        {
  +            return dId;
  +        }
  +
  +        public void setdId(long dId)
  +        {
  +            this.dId = dId;
  +        }
  +
  +        public int getcAttrib()
  +        {
  +            return cAttrib;
  +        }
  +
  +        public void setcAttrib(int cAttrib)
  +        {
  +            this.cAttrib = cAttrib;
  +        }
  +
           /**
            * @return
            */
  @@ -844,7 +895,7 @@
           }
   
           /**
  -         * @param collection
  +         *
            */
           public void setD(D d)
           {
  @@ -884,7 +935,7 @@
           private int c1Attrib;
   
           /**
  -         * @param cAttrib
  +         *
            */
   
           public C1()
  
  
  
  1.14      +7 -19     db-ojb/src/test/org/apache/ojb/broker/PolymorphicExtents.java
  
  Index: PolymorphicExtents.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PolymorphicExtents.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PolymorphicExtents.java	29 Apr 2003 15:43:26 -0000	1.13
  +++ PolymorphicExtents.java	12 Jul 2004 16:26:26 -0000	1.14
  @@ -3,7 +3,6 @@
   import java.util.Collection;
   
   import junit.framework.TestCase;
  -
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.query.Criteria;
  @@ -133,27 +132,16 @@
   	/** TestThreadsNLocks EXTENT lookup: a collection with ALL objects in the Article extent*/
   	public void testExtentByQuery()
   	{
  -		try
  -		{
  -			// no criteria signals to omit a WHERE clause
  -			Criteria selectAll = null;
  -			Query q = QueryFactory.newQuery(InterfaceArticle.class, selectAll);
  +        // no criteria signals to omit a WHERE clause
  +        Criteria selectAll = null;
  +        Query q = QueryFactory.newQuery(InterfaceArticle.class, selectAll);
   
  -			Collection result = broker.getCollectionByQuery(q);
  -
  -			//System.out.println("OJB proudly presents: The InterfaceArticle Extent\n" + result);
  -
  -			assertNotNull("should return at least one item", result);
  -			assertTrue("should return at least one item", result.size() > 0);
  +        Collection result = broker.getCollectionByQuery(q);
   
  -		}
  -		catch (Throwable t)
  +        //System.out.println("OJB proudly presents: The InterfaceArticle Extent\n" + result);
   
  -			{
  -			System.out.println(t.getMessage());
  -			t.printStackTrace();
  -			fail(t.getMessage());
  -		}
  +        assertNotNull("should return at least one item", result);
  +        assertTrue("should return at least one item", result.size() > 0);
   	}
   
   	/** TestThreadsNLocks to lookup items from extent classes*/
  
  
  
  1.6       +3 -10     db-ojb/src/test/org/apache/ojb/broker/ProductGroupProxy.java
  
  Index: ProductGroupProxy.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/ProductGroupProxy.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProductGroupProxy.java	9 Apr 2004 13:22:29 -0000	1.5
  +++ ProductGroupProxy.java	12 Jul 2004 16:26:26 -0000	1.6
  @@ -1,17 +1,11 @@
   package org.apache.ojb.broker;
   
  -import java.util.List;
   import java.io.Serializable;
  -
  -//#ifdef JDK13
   import java.lang.reflect.InvocationHandler;
  +import java.util.List;
  +
  +import org.apache.ojb.broker.core.proxy.VirtualProxy;
   
  -import org.apache.ojb.broker.core.proxy.*;
  -//#else
  -/*
  -import com.develop.java.lang.reflect.InvocationHandler;
  -*/
  -//#endif
   
   /**
    * Proxy class for ProductGroup.
  @@ -70,7 +64,6 @@
           }
           catch (Throwable t)
           {
  -            System.out.println(t.getMessage());
               t.printStackTrace();
               return null;
           }
  
  
  
  1.13      +9 -11     db-ojb/src/test/org/apache/ojb/broker/ProxyExamples.java
  
  Index: ProxyExamples.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/ProxyExamples.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ProxyExamples.java	31 May 2004 22:57:21 -0000	1.12
  +++ ProxyExamples.java	12 Jul 2004 16:26:26 -0000	1.13
  @@ -1,15 +1,14 @@
   package org.apache.ojb.broker;
   
  +import java.lang.reflect.Proxy;
  +import java.util.Collection;
  +import java.util.Iterator;
  +import java.util.Vector;
  +
   import org.apache.ojb.broker.core.proxy.VirtualProxy;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.junit.PBTestCase;
  -
  -import java.util.Collection;
  -import java.util.Iterator;
  -import java.util.Vector;
  -//#ifdef JDK13
  -import java.lang.reflect.Proxy;
   //#else
   /*
   import com.develop.java.lang.reflect.Proxy;
  @@ -135,11 +134,10 @@
   			Class proxyClass = Proxy.getProxyClass(clazz.getClassLoader(), interfaces);
   			return proxyClass;
   		}
  -		catch (Throwable t)
  +		catch (Exception e)
   		{
  -			System.out.println(
  -				"OJB Warning: can not use dynamic proxy for class " + clazz.getName() + ": " + t.getMessage());
  -			return null;
  +			throw new OJBRuntimeException(
  +				"Test Error: can not use dynamic proxy for class " + clazz.getName() + ": " + e.getMessage(),
e);
   		}
   
   	}
  @@ -157,7 +155,7 @@
   	 * but only out-comment the corresponding entry in the repos
   	 * itory.
   	 */
  -	public void testDynamicProxies()
  +	public void testDynamicProxies() throws Exception
   	{
           Vector myArticles = new Vector();
           // In the following code we will generate 10 Proxy-objects.
  
  
  
  1.62      +1 -1      db-ojb/src/test/org/apache/ojb/broker/QueryTest.java
  
  Index: QueryTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/QueryTest.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- QueryTest.java	25 Jun 2004 13:11:35 -0000	1.61
  +++ QueryTest.java	12 Jul 2004 16:26:26 -0000	1.62
  @@ -169,7 +169,7 @@
   
           results = broker.getCollectionByQuery(q);
           assertNotNull(results);
  -        System.out.println("*** Found " + results.size() + " empty ProductGroups ***");
  +        // System.out.println("*** Found " + results.size() + " empty ProductGroups ***");
           assertEquals("Result of the query with sub-query does not match", loops, results.size());
   
       }
  
  
  
  1.2       +2 -2      db-ojb/src/test/org/apache/ojb/junit/JUnitExtensions.java
  
  Index: JUnitExtensions.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/junit/JUnitExtensions.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JUnitExtensions.java	5 Apr 2004 17:11:49 -0000	1.1
  +++ JUnitExtensions.java	12 Jul 2004 16:26:27 -0000	1.2
  @@ -135,7 +135,7 @@
               }
               catch (InterruptedException ignore)
               {
  -                System.out.println("Thread join interrupted.");
  +                throw new RuntimeException("Thread.join() call made on interrupted thread");
               }
               threads = null;
           }
  
  
  
  1.14      +6 -7      db-ojb/src/test/org/apache/ojb/odmg/UserTestCases.java
  
  Index: UserTestCases.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/UserTestCases.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- UserTestCases.java	22 Jun 2004 18:16:23 -0000	1.13
  +++ UserTestCases.java	12 Jul 2004 16:26:27 -0000	1.14
  @@ -3,19 +3,18 @@
   import java.util.List;
   
   import junit.framework.TestCase;
  -
  -import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.Identity;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.util.configuration.impl.OjbConfiguration;
   import org.apache.ojb.broker.util.configuration.impl.OjbConfigurator;
  -import org.apache.ojb.odmg.shared.PersonImpl;
   import org.apache.ojb.odmg.shared.Person;
  +import org.apache.ojb.odmg.shared.PersonImpl;
   import org.apache.ojb.odmg.shared.Site;
   import org.odmg.Database;
   import org.odmg.Implementation;
  +import org.odmg.ODMGException;
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
  -import org.odmg.ODMGException;
   import org.odmg.TransactionNotInProgressException;
   
   
  @@ -260,13 +259,13 @@
             TransactionImpl txn = (TransactionImpl)odmg.newTransaction();
             txn.begin();
             txn.lock(mum, Transaction.WRITE);
  -          System.out.println("locked for write: " + mum);
  +          // System.out.println("locked for write: " + mum);
             Identity mumId = new Identity(mum, txn.getBroker());
             txn.commit();
             txn.begin();
   
             Person mum2 = (Person)txn.getObjectByIdentity(mumId);
  -          System.out.println("retrieved: " + mum2);
  +          // System.out.println("retrieved: " + mum2);
             txn.commit();
             db.close();
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message