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_STATEDEFAULT_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, verifyTupleassertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, toStringprivate 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.TestCasejava.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
BaseJDBCTestCasetearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic void testHeldForwardOnlyResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldForwardOnlyResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldForwardOnlyUpdatableResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCompressOnHeldForwardOnlyUpdatableResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCompressOnHeldForwardOnlyUpdatableResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldForwardOnlyUpdatableResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableResultSetScanDone()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableUpdatableResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableUpdatableResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testHeldScrollableUpdatableResultSetScanDone()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowAfterCommitOnHeldForwardOnlyResultSet()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowAfterCommitOnHeldScrollInsensitiveResultSet()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCompressOnHeldScrollableUpdatableResultSetScanInit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCompressOnHeldScrollableUpdatableResultSetScanInProgress()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCompressOnHeldScrollableUpdatableResultSetScanDone()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void verifyResultSetUpdatableAfterCompress(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void verifyCompressInvalidation(java.sql.ResultSet rs)
throws java.sql.SQLException
rs - ResultSet which we test is being invalidatedjava.sql.SQLExceptionprivate 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.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.