public class ClobUpdatableReaderTest extends BaseJDBCTestCase
UpdateableReader
for Clob
in
embedded driver.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
dummy |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
ClobUpdatableReaderTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private int |
assertCorrectChar(int prevChar,
int nextChar)
Asserts that the two specified characters follow each other in the
modern latin lowercase alphabet.
|
private java.lang.String |
getUnicodeString()
Generates a (static) string containing various Unicode characters.
|
void |
setUp()
Setup the test.
|
static junit.framework.Test |
suite() |
protected void |
tearDown()
Cleans up the database.
|
void |
testMultiplexedOperationProblem()
Tests that the Clob can handle multiple streams and the length call
multiplexed.
|
void |
testUpdateableReader()
Tests updates on reader.
|
void |
testUpdateableStoreReader()
Test updating a large clob
|
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, 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, toString
private final java.lang.String dummy
public void testUpdateableStoreReader() throws java.lang.Exception
java.lang.Exception
public void testUpdateableReader() throws java.lang.Exception
java.lang.Exception
public void testMultiplexedOperationProblem() throws java.io.IOException, java.sql.SQLException
This test was written after bug DERBY-2806 was reported, where getting the length of the Clob after fetching a stream from it would exhaust the stream and cause the next read to return -1.
The test is written to work on a Clob that operates on streams from the store, which currently means that it must be over a certain size and that no modifying methods can be called on it.
java.io.IOException
java.sql.SQLException
private int assertCorrectChar(int prevChar, int nextChar) throws java.io.IOException
java.io.IOException
private java.lang.String getUnicodeString()
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.sql.SQLException
- if database access failsjava.lang.Exception
public static junit.framework.Test suite()
protected void tearDown() throws java.lang.Exception
tearDown
in class BaseJDBCTestCase
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.