public class LOBLocatorReleaseTest extends BaseJDBCTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
LOBLocatorReleaseTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
assertInvalid(java.sql.Clob clob)
Asserts that the Clob is invalid by invoking a method on it (that is
supposed to fail) and catching the exception.
|
private void |
forwardOnlyTest(java.lang.String table) |
private void |
scrollableTest(java.lang.String table,
int rsConcurrency)
Tests a sequence of operations on a scrollable result set.
|
static junit.framework.Test |
suite()
Returns a default suite running in a client-server environment.
|
void |
testBlobClobStateAfterCloseOnScrollable()
Tests that the LOB objects are not closed when closing the result set.
|
void |
testBlobClobStateForwardOnlyWithNoNulls()
Tests that the LOB objects are not closed when closing the result set.
|
void |
testForwardOnlyWithNoNulls()
Test basic operations on forward only result sets.
|
void |
testForwardOnlyWithNulls()
Test basic operations on forward only result sets containing NULL LOBs.
|
void |
testNoLOBs()
Tests that the code path for LOB locator release works fine for result
sets without LOBs.
|
void |
testScrollableAbsoluteRow()
Tests that absolute positioning can be called for the same row multiple
times on a scrollable resultset.
|
void |
testScrollableMoveToCurrentRow()
Tests that the cursor can be positioned on the current row multiple
times on a scrollable resultset.
|
void |
testScrollableUpdateWithLocators()
Tests a sequence of operations on a scrollable, updatable resultset.
|
void |
testScrollableWithNoNulls()
Test navigation on a scrollable result set with LOB columns.
|
void |
testScrollableWithNulls()
Test navigation on a scrollable result set with LOB columns containing
some NULL values.
|
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, tearDown, 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, setUp, toString
public void testNoLOBs() throws java.sql.SQLException
java.sql.SQLException
- if the test fails for some reasonpublic void testForwardOnlyWithNoNulls() throws java.sql.SQLException
java.sql.SQLException
- if something causes the test to failpublic void testForwardOnlyWithNulls() throws java.sql.SQLException
This requires some special care because NUL LOBs don't have a locator.
java.sql.SQLException
- if something causes the test to failprivate void forwardOnlyTest(java.lang.String table) throws java.sql.SQLException
java.sql.SQLException
public void testBlobClobStateForwardOnlyWithNoNulls() throws java.sql.SQLException
java.sql.SQLException
- if something causes the test to failpublic void testBlobClobStateAfterCloseOnScrollable() throws java.sql.SQLException
java.sql.SQLException
- if something causes the test to failpublic void testScrollableWithNoNulls() throws java.sql.SQLException
java.sql.SQLException
public void testScrollableWithNulls() throws java.sql.SQLException
java.sql.SQLException
private void scrollableTest(java.lang.String table, int rsConcurrency) throws java.sql.SQLException
table
- the table to queryrsConcurrency
- the result set concurrencyjava.sql.SQLException
public void testScrollableMoveToCurrentRow() throws java.sql.SQLException
The motivation for the test is that the locators assoicated with the current row must not be released multiple times.
java.sql.SQLException
public void testScrollableAbsoluteRow() throws java.sql.SQLException
java.sql.SQLException
public void testScrollableUpdateWithLocators() throws java.sql.SQLException
java.sql.SQLException
- if the test failsprivate void assertInvalid(java.sql.Clob clob)
clob
- the Clob to checkpublic static junit.framework.Test suite()
The tests in this class is only meant to be run with client-server.
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.