public class LobSortTest extends BaseJDBCTestCase
Note that the seed used for the random number generator is included in the name of the test methods. Knowing the seed enables debugging by being able to rerun a specific test sequence that failed. The random number generator is only used during data insertion.
See DERBY-4245.
NOTE: This test is sensitive to the JVM heap size, which is one of the factors determining whether the sort is done internally or externally. The bug for a clean database would only occur with the external sort.
Modifier and Type | Field and Description |
---|---|
private static long |
SEED
The seed used for the random number generator.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
LobSortTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
fetchIterateGetLengthBlob(java.lang.String sql)
Executes the specified query two times, materializes the Blob on the
first run and gets the length through
Blob.length on the second. |
private void |
fetchIterateGetLengthClob(java.lang.String sql)
Executes the specified query two times, materializes the Clob on the
first run and gets the length through
Clob.length on the second. |
java.lang.String |
getName()
Overridden naming method which includes the seed used for the random
generator.
|
static junit.framework.Test |
suite() |
void |
testBlobClob() |
void |
testBlobLarge() |
void |
testBlobMixed() |
void |
testBlobRandom() |
void |
testBlobSmall() |
void |
testClobBlob() |
void |
testClobLarge() |
void |
testClobMixed() |
void |
testClobRandom() |
void |
testClobSmall() |
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, run, run, runTest, setName, setUp, toString
public java.lang.String getName()
The seed is required if one wants to replay a specific sequence for debugging purposes.
getName
in class junit.framework.TestCase
public void testBlobMixed() throws java.sql.SQLException
java.sql.SQLException
public void testBlobSmall() throws java.sql.SQLException
java.sql.SQLException
public void testBlobLarge() throws java.sql.SQLException
java.sql.SQLException
public void testBlobClob() throws java.sql.SQLException
java.sql.SQLException
public void testBlobRandom() throws java.sql.SQLException
java.sql.SQLException
public void testClobMixed() throws java.sql.SQLException
java.sql.SQLException
public void testClobSmall() throws java.sql.SQLException
java.sql.SQLException
public void testClobLarge() throws java.sql.SQLException
java.sql.SQLException
public void testClobBlob() throws java.sql.SQLException
java.sql.SQLException
public void testClobRandom() throws java.sql.SQLException
java.sql.SQLException
private void fetchIterateGetLengthBlob(java.lang.String sql) throws java.sql.SQLException
Blob.length
on the second.
Note that the query must select a Blob column at index one and the length at index two.
sql
- query to executejava.sql.SQLException
- if the test fails for some reasonprivate void fetchIterateGetLengthClob(java.lang.String sql) throws java.sql.SQLException
Clob.length
on the second.
Note that the query must select a Clob column at index one and the length at index two.
sql
- query to executejava.sql.SQLException
- if the test fails for some reasonpublic static junit.framework.Test suite()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.