public class JDBC4FromJDBC3DataSourceTest extends BaseJDBCTestCase
This test ensures that when a JDBC 4 application instantiates a JDBC 3 data source, that data source will return JDBC 4 connections even though the data source itself is not a JDBC 4 object.
Note that after DERBY-5868 and DERBY-5880, all the data sources implement all JDBC 4.0 methods.
Neither the client nor the embedded variants of the JDBC 3 data sources implement the full JDBC 4.1 interface.
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
JDBC4FromJDBC3DataSourceTest(java.lang.String name)
Create a test with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkJDBC4Interface(javax.sql.PooledConnection pc)
Make sure that the received PooledConnection, which we assume came
from a JDBC 3 data source, is nonetheless a JDBC 4 object.
|
static junit.framework.Test |
suite()
Return suite with all tests of the class.
|
void |
testPooledConnection()
Test that a JDBC 3 data source returns a JDBC 4 PooledConnection
when running with a JDBC 4 JDK.
|
void |
testXAConnection()
Test that a JDBC 3 data source returns a JDBC 4 XAConnection
when running with a JDBC 4 JDK.
|
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, 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, setUp, toStringpublic JDBC4FromJDBC3DataSourceTest(java.lang.String name)
name - name of the test.public static junit.framework.Test suite()
public void testPooledConnection()
throws java.lang.Exception
java.lang.Exceptionpublic void testXAConnection()
throws java.lang.Exception
java.lang.Exceptionprivate void checkJDBC4Interface(javax.sql.PooledConnection pc)
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.