public class HoldabilityTest extends SURBaseTest
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
selectStatement |
CURSOR_NOT_POSITIONED_ON_INSERT_ROW, CURSOR_NOT_UPDATABLE_SQL_STATE, CURSOR_OPERATION_CONFLICT, FOR_UPDATE_NOT_PERMITTED_SQL_STATE, INVALID_CURSOR_STATE_NO_CURRENT_ROW, LOCK_TIMEOUT_EXPRESSION_SQL_STATE, LOCK_TIMEOUT_SQL_STATE, QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET, recordCount, RESULTSET_NOT_UPDATABLE_SQL_STATE
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
HoldabilityTest(java.lang.String name)
Creates a new instance of HoldabilityTest
|
Modifier and Type | Method and Description |
---|---|
private void |
onlineCompress(boolean purge,
boolean defragment,
boolean truncate)
Executes online compress
|
protected void |
setUp()
Sets up the connection, then create the data model
|
static junit.framework.Test |
suite() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testCompressOnHeldForwardOnlyUpdatableResultSetScanInit()
Test that a forward only resultset can be held over commit while
it has not done any scanning, and that after a compress it is
still updatable.
|
void |
testCompressOnHeldForwardOnlyUpdatableResultSetScanInProgress()
Test that a forward only resultset can be held over commit while
it is in progress of scanning, and that after a compress the
resultset is still updatable.
|
void |
testCompressOnHeldScrollableUpdatableResultSetScanDone()
Test that running a compress on a holdable scrollable updatable
resultset will invalidate the Resultset from doing updates after
a renavigate.
|
void |
testCompressOnHeldScrollableUpdatableResultSetScanInit()
Test that running a compress on a holdable scrollable updatable
resultset will not invalidate the ResultSet from doing updates,
if the scan is initialized
|
void |
testCompressOnHeldScrollableUpdatableResultSetScanInProgress()
Test that running a compress on a holdable scrollable updatable
resultset will invalidate the Resultset from doing updates after
a renavigate, if the scan is in progress.
|
void |
testHeldForwardOnlyResultSetScanInit()
Test that a forward only resultset can be held over commit while
it has not done any scanning
|
void |
testHeldForwardOnlyResultSetScanInProgress()
Test that a forward only resultset can be held over commit while
it is in progress of scanning
|
void |
testHeldForwardOnlyUpdatableResultSetScanInit()
Test that a forward only resultset can be held over commit while
it has not done any scanning, and be updatable
|
void |
testHeldForwardOnlyUpdatableResultSetScanInProgress()
Test that a forward only resultset can be held over commit while
it is in progress of scanning
|
void |
testHeldScrollableResultSetScanDone()
Test that a scrollable resultset can be held over commit
after the resultset has been populated
|
void |
testHeldScrollableResultSetScanInit()
Test that a scrollable resultset can be held over commit while
it has not done any scanning
|
void |
testHeldScrollableResultSetScanInProgress()
Test that a scrollable resultset can be held over commit while
it is in progress of scanning
|
void |
testHeldScrollableUpdatableResultSetScanDone()
Test that a scrollable updatable resultset can be held over commit
after the resultset has been populated
|
void |
testHeldScrollableUpdatableResultSetScanInit()
Test that a scrollable updatable resultset can be held over commit
while it has not done any scanning
|
void |
testHeldScrollableUpdatableResultSetScanInProgress()
Test that a scrollable updatable resultset can be held over commit while
it is in progress of scanning
|
void |
testUpdateRowAfterCommitOnHeldForwardOnlyResultSet()
Test that updateRow() after a commit requires a renavigation
on a held forward only ResulTset.
|
void |
testUpdateRowAfterCommitOnHeldScrollInsensitiveResultSet()
Test that updateRow() after a commit requires a renavigation
on a held scrollinsensitve ResulTset.
|
private void |
verifyCompressInvalidation(java.sql.ResultSet rs)
Verifies that the ResultSet is invalidated from doing updates after
a compress.
|
private void |
verifyResultSetUpdatableAfterCompress(java.sql.ResultSet rs)
Verifies that even after a compress, the ResultSet of this type and
state is updatable.
|
assertFailOnUpdate, assertWarning, initializeConnection, scrollBackward, scrollBackwardAndUpdate, scrollBackwardAndUpdatePositioned, scrollForward, scrollForwardAndUpdate, scrollForwardAndUpdatePositioned, updateTuple, updateTuplePositioned, verifyTuple
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
private static final java.lang.String selectStatement
public HoldabilityTest(java.lang.String name)
public static junit.framework.Test suite()
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testHeldForwardOnlyResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testHeldForwardOnlyResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testHeldForwardOnlyUpdatableResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testCompressOnHeldForwardOnlyUpdatableResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testCompressOnHeldForwardOnlyUpdatableResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testHeldForwardOnlyUpdatableResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableResultSetScanDone() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableUpdatableResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableUpdatableResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testHeldScrollableUpdatableResultSetScanDone() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowAfterCommitOnHeldForwardOnlyResultSet() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowAfterCommitOnHeldScrollInsensitiveResultSet() throws java.sql.SQLException
java.sql.SQLException
public void testCompressOnHeldScrollableUpdatableResultSetScanInit() throws java.sql.SQLException
java.sql.SQLException
public void testCompressOnHeldScrollableUpdatableResultSetScanInProgress() throws java.sql.SQLException
java.sql.SQLException
public void testCompressOnHeldScrollableUpdatableResultSetScanDone() throws java.sql.SQLException
java.sql.SQLException
private void verifyResultSetUpdatableAfterCompress(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
private void verifyCompressInvalidation(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- ResultSet which we test is being invalidatedjava.sql.SQLException
private void onlineCompress(boolean purge, boolean defragment, boolean truncate) throws java.sql.SQLException
purge
- set to true to purge rowsdefragment
- set to true to defragment rowstruncate
- set to true to truncate pagesjava.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.