public class ClobReclamationTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static int |
expectedNumAllocated |
private static int |
NUM_THREADS |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
ClobReclamationTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
checkNumAllocatedPages(java.lang.String table,
int expectedAlloc)
Check that table has specified number of allocated pages.
|
private void |
checkNumFreePages(java.lang.String table,
int expectedFree)
Check that table has specified number of free pages.
|
private static void |
fiveHundredUpdates(java.sql.Connection conn,
java.lang.String updateString,
int key,
boolean lockTable) |
static junit.framework.Test |
suite() |
void |
testBlobLinkedListReclamationOnRollback()
Test for DERBY-4182.
|
void |
testMultiThreadedUpdate(boolean lockTable,
boolean updateSingleRow)
Two threads simultaneously updating a table.
|
void |
testMultiThreadedUpdateRowLocking()
Test multithreaded clob update using standard row locking
|
void |
xtestMultiThreadedUpdateTableLocking()
Test multithreaded clob update but get an exclusive lock on the
table for each update.
|
void |
xtestMultiThreadUpdateSingleRow()
Test multiThreaded update of single row to cause lock contention
This will trigger the row lock retry case of DERBY-4055
|
void |
xtestReclamationOnRollback()
Make sure we reclaim space on rollback.
|
assertCallError, 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, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, 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, traceit
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, setUp, toString
private static final int NUM_THREADS
private static int expectedNumAllocated
public void testMultiThreadedUpdate(boolean lockTable, boolean updateSingleRow) throws java.sql.SQLException, java.lang.InterruptedException
lockTable
- true if we should get an exclusive lock on the table
before updateupdateSingleRow
- true if we should try updating a single row
instead of different rowsjava.sql.SQLException
java.lang.InterruptedException
private void checkNumAllocatedPages(java.lang.String table, int expectedAlloc) throws java.sql.SQLException
table
- expectedAlloc
- java.sql.SQLException
private void checkNumFreePages(java.lang.String table, int expectedFree) throws java.sql.SQLException
table
- expectedFree
- expected number of free pages.java.sql.SQLException
private static void fiveHundredUpdates(java.sql.Connection conn, java.lang.String updateString, int key, boolean lockTable) throws java.sql.SQLException
java.sql.SQLException
public void testMultiThreadedUpdateRowLocking() throws java.sql.SQLException, java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException
public void xtestMultiThreadedUpdateTableLocking() throws java.sql.SQLException, java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException
public void xtestMultiThreadUpdateSingleRow() throws java.sql.SQLException, java.lang.InterruptedException
java.sql.SQLException
java.lang.InterruptedException
public void xtestReclamationOnRollback() throws java.sql.SQLException
java.sql.SQLException
public void testBlobLinkedListReclamationOnRollback() throws java.sql.SQLException
java.sql.SQLException
public static junit.framework.Test suite()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.