org.apache.derbyTesting.functionTests.tests.jdbcapi
Class SetTransactionIsolationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.SetTransactionIsolationTest
All Implemented Interfaces:
junit.framework.Test

public class SetTransactionIsolationTest
extends BaseJDBCTestCase

Test setTransactionIsolation


Field Summary
static int[] isoLevels
           
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
SetTransactionIsolationTest(java.lang.String name)
           
 
Method Summary
static junit.framework.Test baseSuite(java.lang.String name)
           
private  void checkIsolationLevelNoTimeout(java.sql.Connection conn, int isoLevel)
          Test setTransactionIsolation and queries with no timeout expected
private  void checkIsolationLevelTimeout(java.sql.Connection conn, int isoLevel)
          Check setTransactioIsolation and queries with timeout expected in all cases except READ_UNCOMMITTED
static junit.framework.Test suite()
           
 void testIsolation()
          test setting of isolation levels with and without lock timeouts
 void testSetTransactionIsolationCommits()
          setTransactionIsolation commits?
 void testSetTransactionIsolationInHoldCursor()
          Call setTransactionIsolation with holdable cursor open?
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isoLevels

public static int[] isoLevels
Constructor Detail

SetTransactionIsolationTest

public SetTransactionIsolationTest(java.lang.String name)
Parameters:
name -
Method Detail

testIsolation

public void testIsolation()
                   throws java.sql.SQLException
test setting of isolation levels with and without lock timeouts

Throws:
java.sql.SQLException

checkIsolationLevelTimeout

private void checkIsolationLevelTimeout(java.sql.Connection conn,
                                        int isoLevel)
                                 throws java.sql.SQLException
Check setTransactioIsolation and queries with timeout expected in all cases except READ_UNCOMMITTED

Parameters:
conn - Connection to use
isoLevel - Isolation level to test from Connection.TRANSACTION_*
Throws:
java.sql.SQLException

checkIsolationLevelNoTimeout

private void checkIsolationLevelNoTimeout(java.sql.Connection conn,
                                          int isoLevel)
                                   throws java.sql.SQLException
Test setTransactionIsolation and queries with no timeout expected

Parameters:
conn -
isoLevel -
Throws:
java.sql.SQLException

testSetTransactionIsolationCommits

public void testSetTransactionIsolationCommits()
                                        throws java.sql.SQLException
setTransactionIsolation commits?

Throws:
java.sql.SQLException

testSetTransactionIsolationInHoldCursor

public void testSetTransactionIsolationInHoldCursor()
                                             throws java.sql.SQLException
Call setTransactionIsolation with holdable cursor open?

Throws:
java.sql.SQLException

baseSuite

public static junit.framework.Test baseSuite(java.lang.String name)

suite

public static junit.framework.Test suite()

Built on Thu 2009-11-26 18:42:53-0800, from revision 884739

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.