public class DriverTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String[] |
ADDITIONAL_DBS
Set of additional databases for tests that
require a one-off database.
|
private static java.lang.String |
DB_NAME_WITH_SPACES |
private static java.lang.String |
MALFORMED_URL |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
DriverTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private static void |
assertConnect(boolean expectUrlEqualsGetUrl,
java.lang.String url,
java.util.Properties info)
Do java.sql.Driver.connect(String url, Properties info call)
|
private static void |
assertTraceFilesExist()
Check that trace files exist
|
private static junit.framework.Test |
baseSuite(java.lang.String name) |
private static void |
loadDriver()
Load the appropriate driver for the current framework
|
private static void |
setBaseProps(BaseTestSuite suite,
junit.framework.Test test) |
private static void |
shutdownDB(java.lang.String url,
java.util.Properties info)
use this method to shutdown databases in an effort to release
any locks they may be holding
|
static junit.framework.Test |
suite() |
void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testAcceptsURL()
Check that drivers accept the correct urls and reject those for other supported drivers.
|
void |
testClientAttributes()
Tests that client side attributes cann be specified in either url or
as info argument to connect.
|
void |
testClientURL()
Tests client URLs to see connection is successful or the correct exception is thrown.
|
void |
testDbNameWithSpaces()
Tests URL with spaces in database name to check create and connect works.
|
void |
testDriverCompliantVersion()
Load the driver and check java.sql.Driver.jdbcCompliant() and
driver.get*Version
|
void |
testEmbeddedAttributes()
Tests that embedded attributes can be specified in either url or info
argument to connect
DERBY-530.
|
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, setUp, toString
private static final java.lang.String DB_NAME_WITH_SPACES
private static final java.lang.String MALFORMED_URL
static final java.lang.String[] ADDITIONAL_DBS
public static junit.framework.Test suite()
private static junit.framework.Test baseSuite(java.lang.String name)
private static void setBaseProps(BaseTestSuite suite, junit.framework.Test test)
public void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testDriverCompliantVersion() throws java.lang.Exception
java.lang.Exception
public void testAcceptsURL() throws java.sql.SQLException, java.lang.Exception
SQLException,
- Exceptionjava.sql.SQLException
java.lang.Exception
public void testEmbeddedAttributes() throws java.sql.SQLException
java.sql.SQLException
public void testClientAttributes() throws java.sql.SQLException
java.sql.SQLException
private static void assertTraceFilesExist()
public void testClientURL() throws java.sql.SQLException
java.sql.SQLException
public void testDbNameWithSpaces() throws java.sql.SQLException
java.sql.SQLException
private static void assertConnect(boolean expectUrlEqualsGetUrl, java.lang.String url, java.util.Properties info) throws java.sql.SQLException
expectUrlEqualsGetUrl
- boolean indicating embedded would
expect the url passed in to equal metadata.getURL()url
- url to pass to Driver.connect()info
- properties to pass to Driver.Connect()java.sql.SQLException
- on error.private static void shutdownDB(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
java.sql.SQLException
private static void loadDriver()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.