public class Derby4676Test extends BaseJDBCTestCase
| Modifier and Type | Class and Description |
|---|---|
private class |
Derby4676Test.HelperThread
Helper class for running database operations in a separate thread and
in a separate transaction.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Derby4676Test.HelperThread> |
threads
List of
HelperThreads used in the test. |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
Derby4676Test(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp()
Set up the test environment.
|
private void |
startThread(Derby4676Test.HelperThread thread)
Start a helper thread and register it for automatic clean-up in
tearDown(). |
static junit.framework.Test |
suite()
Create a suite of tests.
|
protected void |
tearDown()
Tear down the test environment.
|
void |
testConcurrentFetchAndDelete()
Regression test case for DERBY-4676.
|
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, initializeConnection, 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, 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, vmAtLeastassertEquals, 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 java.util.List<Derby4676Test.HelperThread> threads
HelperThreads used in the test.public static junit.framework.Test suite()
protected void setUp()
setUp in class junit.framework.TestCaseprotected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic void testConcurrentFetchAndDelete()
throws java.lang.Exception
Regression test case for DERBY-4676. Before the fix, fetching a row by its row location would sometimes fail with a NullPointerException if the row was deleted while the fetch operation was waiting for a lock.
java.lang.Exceptionprivate void startThread(Derby4676Test.HelperThread thread)
tearDown().thread - the helper thread to startApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.