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 LockTestCommitedReads.java LockTestRepeatableReads.java LockTestSerializable.java LockTestUncommitedReads.java
Date Mon, 15 Nov 2004 17:55:40 GMT
arminw      2004/11/15 09:55:40

  Modified:    src/test/org/apache/ojb/odmg Tag: OJB_1_0_RELEASE
                        LockTestCommitedReads.java
                        LockTestRepeatableReads.java
                        LockTestSerializable.java
                        LockTestUncommitedReads.java
  Log:
  add new locking tests
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.2   +22 -0     db-ojb/src/test/org/apache/ojb/odmg/LockTestCommitedReads.java
  
  Index: LockTestCommitedReads.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/LockTestCommitedReads.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- LockTestCommitedReads.java	18 Sep 2004 13:06:40 -0000	1.7.2.1
  +++ LockTestCommitedReads.java	15 Nov 2004 17:55:40 -0000	1.7.2.2
  @@ -85,6 +85,28 @@
       }
   
   
  +    /**
  +     * Test 19
  +     */
  +    public void testWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
  +     * Test 20
  +     */
  +    public void testReadWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.readLock(tx2, obj));
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
   
       /**
        * Test 1
  
  
  
  1.7.2.2   +23 -0     db-ojb/src/test/org/apache/ojb/odmg/LockTestRepeatableReads.java
  
  Index: LockTestRepeatableReads.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/LockTestRepeatableReads.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- LockTestRepeatableReads.java	18 Sep 2004 13:06:40 -0000	1.7.2.1
  +++ LockTestRepeatableReads.java	15 Nov 2004 17:55:40 -0000	1.7.2.2
  @@ -86,6 +86,29 @@
       }
   
       /**
  +     * Test 19
  +     */
  +    public void testWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
  +     * Test 20
  +     */
  +    public void testReadWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.readLock(tx2, obj));
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
        * Test 1
        */
       public void testSingleReadLock()
  
  
  
  1.7.2.2   +23 -0     db-ojb/src/test/org/apache/ojb/odmg/LockTestSerializable.java
  
  Index: LockTestSerializable.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/LockTestSerializable.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- LockTestSerializable.java	18 Sep 2004 13:06:40 -0000	1.7.2.1
  +++ LockTestSerializable.java	15 Nov 2004 17:55:40 -0000	1.7.2.2
  @@ -86,6 +86,29 @@
       }
   
       /**
  +     * Test 19
  +     */
  +    public void testWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
  +     * Test 20
  +     */
  +    public void testReadWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.readLock(tx2, obj));
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
        * Test 1
        */
       public void testSingleReadLock()
  
  
  
  1.7.2.2   +23 -0     db-ojb/src/test/org/apache/ojb/odmg/LockTestUncommitedReads.java
  
  Index: LockTestUncommitedReads.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/LockTestUncommitedReads.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- LockTestUncommitedReads.java	18 Sep 2004 13:06:40 -0000	1.7.2.1
  +++ LockTestUncommitedReads.java	15 Nov 2004 17:55:40 -0000	1.7.2.2
  @@ -86,6 +86,29 @@
       }
   
       /**
  +     * Test 19
  +     */
  +    public void testWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
  +     * Test 20
  +     */
  +    public void testReadWriteReleaseCheckRead()
  +    {
  +        assertTrue(lockManager.readLock(tx2, obj));
  +        assertTrue(lockManager.writeLock(tx2, obj));
  +        assertTrue(lockManager.checkRead(tx2, obj));
  +        assertTrue(lockManager.releaseLock(tx2, obj));
  +        assertFalse(lockManager.checkRead(tx2, obj));
  +    }
  +
  +    /**
        * Test 1
        */
       public void testSingleReadLock()
  
  
  

---------------------------------------------------------------------
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