org.opensubsystems.core.persist.db.driver
Class TransactionTest.TransactionTestInternal

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opensubsystems.core.persist.db.DatabaseTest
              extended by org.opensubsystems.core.persist.db.driver.TransactionTest.TransactionTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
TransactionTest

public static class TransactionTest.TransactionTestInternal
extends DatabaseTest

Internal class which can be included in other test suites directly without including the above suite. This allows us to group multiple tests together and the execute the DatabaseTestSetup only once


Field Summary
 
Fields inherited from class org.opensubsystems.core.persist.db.DatabaseTest
DEFAULT_DB_PASSWORD, DEFAULT_DB_USER, DEFAULT_PROPERTY_FILE, m_connection, m_iRequestedConnectionCount, m_transaction
 
Constructor Summary
TransactionTest.TransactionTestInternal(java.lang.String strTestName)
          Create new test.
 
Method Summary
 void testCommitAfterUpdateDelete()
          Test implemented to try to detect bug in JOTM which turned up to be bug in testCommitAfterUpdateSelect.
 void testCommitAfterUpdateDeleteWithAutoCommit()
          Test implemented to try to detect bug in JOTM which turned up to be bug in testCommitAfterUpdateSelect.
 void testCommitAfterUpdateSelect()
          Update, delete, insert and select record in the same transaction
 void testEmptyCommit()
          Test implemented to try to detect bug in JDBC Transaction manager which was causing the transaction to stay active if nothing was done during the transaction
 void testEmptyRollback()
          Test implemented to try to detect bug in JDBC Transaction manager which was causing the transaction to stay active if nothing was done during the transaction
 void testRollbackUniqueWithJDBC()
          Test if the database driver support rollback.
 void testRollbackUniqueWithJTA()
          Test if the database driver support rollback.
 
Methods inherited from class org.opensubsystems.core.persist.db.DatabaseTest
addDataSource, addDataSource, getDataSourceName, setDataSourceName, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionTest.TransactionTestInternal

public TransactionTest.TransactionTestInternal(java.lang.String strTestName)
Create new test.

Parameters:
strTestName - - name of the test
Method Detail

testRollbackUniqueWithJTA

public void testRollbackUniqueWithJTA()
                               throws java.lang.Throwable
Test if the database driver support rollback. Uses the already setup connection and transaction. No need to close the connection since base class is doing it for us.

Throws:
java.lang.Throwable - - an error has occured during test

testRollbackUniqueWithJDBC

public void testRollbackUniqueWithJDBC()
                                throws java.lang.Throwable
Test if the database driver support rollback. Uses the already setup connection and transaction. No need to close the connection since base class is doing it for us.

Throws:
java.lang.Throwable - - an error has occured during test

testCommitAfterUpdateSelect

public void testCommitAfterUpdateSelect()
                                 throws java.lang.Throwable
Update, delete, insert and select record in the same transaction

Throws:
java.lang.Throwable - - an error has occured during test

testCommitAfterUpdateDelete

public void testCommitAfterUpdateDelete()
                                 throws java.lang.Throwable
Test implemented to try to detect bug in JOTM which turned up to be bug in testCommitAfterUpdateSelect. Now the testCommitAfterUpdateSelect and it still detects the bug in JOTM 1.4.2 and passing in JOTM 1.4.3 This test case also detects defect in WebLogic 9.1 which doesn't enroll connections acquired before the transaction is started in the transaction.

Throws:
java.lang.Throwable - - an error has occured during test

testCommitAfterUpdateDeleteWithAutoCommit

public void testCommitAfterUpdateDeleteWithAutoCommit()
                                               throws java.lang.Throwable
Test implemented to try to detect bug in JOTM which turned up to be bug in testCommitAfterUpdateSelect. Now the testCommitAfterUpdateSelect and it still detects the bug in JOTM 1.4.2 and passing in JOTM 1.4.3

Throws:
java.lang.Throwable - - an error has occured during test

testEmptyCommit

public void testEmptyCommit()
                     throws java.lang.Throwable
Test implemented to try to detect bug in JDBC Transaction manager which was causing the transaction to stay active if nothing was done during the transaction

Throws:
java.lang.Throwable - - an error has occured during test

testEmptyRollback

public void testEmptyRollback()
                       throws java.lang.Throwable
Test implemented to try to detect bug in JDBC Transaction manager which was causing the transaction to stay active if nothing was done during the transaction

Throws:
java.lang.Throwable - - an error has occured during test


Copyright © 2003 - 2006 OpenSubsystems s.r.o.