public class ConnectionTest extends BaseTestCase
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
ConnectionTest.LocalSocketAddressCheckThread |
(package private) class |
ConnectionTest.SpawnedWorkerCounter |
static class |
ConnectionTest.TestEnableEscapeProcessingQueryInterceptor |
BaseTestCase.MockConnectionConfiguration| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
sslFreeBaseUrl |
conn, dbClass, dbName, dbUrl, isOpenSSL, mainConnectionUrl, pstmt, rs, serverVersion, stmt, timeZoneFreeDbUrl| Constructor and Description |
|---|
ConnectionTest() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkInterfaceImplemented(java.lang.reflect.Method[] interfaceMethods,
java.lang.Class<?> implementingClass,
java.lang.Object invokeOn) |
void |
setupSecureSessionTest() |
void |
teardownConnectionTest() |
void |
testAllowLoadLocalInfileInPath()
Tests "LOAD DATA LOCAL INFILE" statements when enabled but restricted to a specific path, by specifying a path in the connection property
'allowLoadLocalInfileInPath'.
|
private void |
testAllowLoadLocalInfileInPathCheckAndDelete() |
void |
testCannedConfigs() |
void |
testCatalog()
Tests catalog functionality
|
void |
testClusterConnection()
Tests a cluster connection for failover, requires a two-node cluster URL specified in com.mysql.jdbc.testsuite.ClusterUrl system property.
|
void |
testCompression() |
private void |
testCompressionWith(java.lang.String useCompression,
int maxPayloadSize) |
void |
testConnectionPropertiesTransform()
Tests functionality of the ConnectionPropertiesTransform interface.
|
void |
testCouplingOfCursorFetch()
Checks if setting useCursorFetch to "true" automatically enables server-side prepared statements.
|
void |
testCreateDatabaseIfNotExist() |
void |
testDeadlockDetection()
Old test was passing due to http://bugs.mysql.com/bug.php?id=989 which is fixed for 5.5+
|
void |
testDecoratorsChain() |
void |
testDontTrackOpenResources()
Checks implementation of 'dontTrackOpenResources' property.
|
void |
testDriverAcceptsURLNullArgument()
Test for Driver.acceptsURL() behavior clarification:
- acceptsURL() throws SQLException if URL is null.
|
void |
testDriverConnectNullArgument()
Test for Driver.connect() behavior clarifications:
- connect() throws SQLException if URL is null.
|
void |
testDriverConnectPropertiesPrecedence()
Test for Driver.connect() behavior clarifications:
- connect() properties precedence is implementation-defined.
|
void |
testDumpQueriesOnException() |
void |
testEnableEscapeProcessing()
Test the new connection property 'enableEscapeProcessing', as well as the old connection property 'processEscapeCodesForPrepStmts' and interrelation
between them.
|
void |
testFailoverConnection()
Tests whether re-connect with non-read-only connection can happen.
|
void |
testFallbackToSystemKeyStore()
Tests connection property 'testFallbackToSystemKeyStore' behavior.
|
void |
testFallbackToSystemTrustStore()
Tests connection property 'testFallbackToSystemTrustStore' behavior.
|
void |
testGatherPerfMetrics()
Tests if gatherPerfMetrics works.
|
void |
testInterfaceImplementation() |
private void |
testInterfaceImplementation(java.sql.Connection connToCheck) |
void |
testIPv6()
IPv6 Connection test.
|
void |
testIsLocal() |
void |
testIsolationLevel()
Tests isolation level functionality
|
void |
testLifecyleInterceptor() |
void |
testLocalInfileDisabled() |
void |
testLocalInfileWithUrl()
Tests functionality of using URLs in 'LOAD DATA LOCAL INFILE' statements.
|
void |
testLocalSocketAddress()
Tests feature of "localSocketAddress", by enumerating local IF's and trying each one in turn.
|
void |
testNewHostParsing() |
void |
testNonVerifyServerCert() |
void |
testPing() |
void |
testReadOnly56() |
void |
testSavepoint()
Tests the savepoint functionality in MySQL.
|
void |
testSelfDestruct() |
void |
testServerConfigurationCache() |
void |
testSessionVariables() |
void |
testSetProfileSql()
Tests setting profileSQL on/off in the span of one connection.
|
void |
testSslConnectionOptions()
Tests that given SSL/TLS related connection properties values are processed as expected.
|
void |
testSupportsRefCursors()
Test for REF_CURSOR support checking.
|
void |
testTimeoutErrors()
Tests WL#14392, Improve timeout error messages [classic].
|
void |
testTLSVersionRemoval()
Tests WL#14805, Remove support for TLS 1.0 and 1.1.
|
void |
testTSLConflictingOptions()
Tests WL#14835, Align TLS option checking across connectors
|
void |
testUsageAdvisorTooLargeResultSet() |
void |
testUseCompress()
Tests if useCompress works.
|
void |
testUseLocalSessionState()
Tests whether or not the configuration 'useLocalSessionState' actually prevents non-needed 'set autocommit=', 'set session transaction isolation ...'
and 'show variables like tx_isolation' queries.
|
void |
testUseLocalSessionStateRollback() |
void |
testUserRequireSSL()
Test authentication with a user that requires an SSL connection.
|
void |
testUserRequireX509()
Test authentication with a user that requires an SSL connection and an authorized client certificate.
|
appendRequiredProperties, assertByteArrayEquals, assertConnectionsHistory, assertEqualsFSAware, assertNonSecureConnection, assertResultSetLength, assertResultSetsEqual, assertSecureConnection, assertSecureConnection, assertSessionStatusEquals, assertThrows, assertThrows, assertThrows, assertThrows, cleanupTempFiles, createDatabase, createDatabase, createFunction, createFunction, createProcedure, createProcedure, createSchemaObject, createSchemaObject, createTable, createTable, createTable, createTable, createUser, createUser, createView, createView, currentTimeMillis, dropDatabase, dropDatabase, dropFunction, dropFunction, dropProcedure, dropProcedure, dropSchemaObject, dropSchemaObject, dropTable, dropTable, dropUser, dropUser, dropView, dropView, fillPrimitiveDefaults, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getEncodedHostFromTestsuiteUrl, getEncodedHostPortPairFromTestsuiteUrl, getFailoverConnection, getFailoverConnection, getHostFreePropertiesFromTestsuiteUrl, getHostFreePropertiesFromTestsuiteUrl, getHostFromTestsuiteUrl, getInstanceNumber, getLoadBalancedConnection, getLoadBalancedConnection, getLoadBalancedConnection, getMysqlVariable, getMysqlVariable, getNewConnection, getNoDbUrl, getPort, getPortFreeHostname, getPortFromTestsuiteUrl, getPropertiesFromTestsuiteUrl, getPropertiesFromUrl, getRowCount, getSingleIndexedValueWithQuery, getSingleIndexedValueWithQuery, getSingleValue, getSingleValueWithQuery, getSourceReplicaReplicationConnection, getSourceReplicaReplicationConnection, getSourceReplicaUrl, getSourceReplicaUrl, getUnreliableFailoverConnection, getUnreliableFailoverConnection, getUnreliableLoadBalancedConnection, getUnreliableLoadBalancedConnection, getUnreliableMultiHostConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, isClassAvailable, isCommunityEdition, isEnterpriseEdition, isMysqlRunningLocally, isRunningOnJRockit, isServerRunningOnWindows, isSysPropDefined, logDebug, newTempBinaryFile, randomString, removeHostRelatedProps, removeSqlMode, runLongTests, setUpBase, supportsLoadLocalInfile, supportsTestCachingSha2PasswordKeys, supportsTestCertificates, supportsTestSha256PasswordKeys, supportsTimeZoneNames, supportsTLSv1_2, tearDownBase, versionMeetsMinimum, versionMeetsMinimum@BeforeEach public void setupSecureSessionTest()
@AfterEach public void teardownConnectionTest()
@Test
public void testCatalog()
throws java.lang.Exception
java.lang.Exception@Test
public void testClusterConnection()
throws java.lang.Exception
java.lang.Exception@Test
public void testDeadlockDetection()
throws java.lang.Exception
java.lang.Exception@Test
public void testIsolationLevel()
throws java.lang.Exception
java.lang.Exception@Test
public void testSavepoint()
throws java.lang.Exception
java.lang.Exception@Test
public void testDumpQueriesOnException()
throws java.lang.Exception
java.lang.Exception@Test
public void testConnectionPropertiesTransform()
throws java.lang.Exception
java.lang.Exception@Test
public void testLocalInfileWithUrl()
throws java.lang.Exception
java.lang.Exception@Test
public void testLocalInfileDisabled()
throws java.lang.Exception
java.lang.Exception@Test
public void testServerConfigurationCache()
throws java.lang.Exception
java.lang.Exception@Test
public void testUseLocalSessionState()
throws java.lang.Exception
java.lang.Exception@Test
public void testFailoverConnection()
throws java.lang.Exception
java.lang.Exception@Test
public void testCannedConfigs()
throws java.lang.Exception
java.lang.Exception@Test
public void testDontTrackOpenResources()
throws java.lang.Exception
java.lang.Exception@Test
public void testPing()
throws java.sql.SQLException
java.sql.SQLException@Test
public void testSessionVariables()
throws java.lang.Exception
java.lang.Exception@Test
public void testSetProfileSql()
throws java.lang.Exception
java.lang.Exception@Test
public void testCreateDatabaseIfNotExist()
throws java.lang.Exception
java.lang.Exception@Test
public void testGatherPerfMetrics()
throws java.lang.Exception
java.lang.Exception@Test
public void testUseCompress()
throws java.lang.Exception
java.lang.Exceptionprivate void testCompressionWith(java.lang.String useCompression,
int maxPayloadSize)
throws java.lang.Exception
useCompression - maxPayloadSize - java.lang.Exception@Test
public void testLocalSocketAddress()
throws java.lang.Exception
java.lang.Exception - if the test can't use at least one of the local machine's interfaces to make an outgoing connection to the server.@Test
public void testUsageAdvisorTooLargeResultSet()
throws java.lang.Exception
java.lang.Exception@Test
public void testUseLocalSessionStateRollback()
throws java.lang.Exception
java.lang.Exception@Test
public void testCouplingOfCursorFetch()
throws java.lang.Exception
java.lang.Exception@Test
public void testInterfaceImplementation()
throws java.lang.Exception
java.lang.Exception@Test
private void testInterfaceImplementation(java.sql.Connection connToCheck)
throws java.lang.Exception
java.lang.Exceptionprivate void checkInterfaceImplemented(java.lang.reflect.Method[] interfaceMethods,
java.lang.Class<?> implementingClass,
java.lang.Object invokeOn)
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException@Test
public void testNonVerifyServerCert()
throws java.lang.Exception
java.lang.Exception@Test
public void testSelfDestruct()
throws java.lang.Exception
java.lang.Exception@Test
public void testLifecyleInterceptor()
throws java.lang.Exception
java.lang.Exception@Test
public void testNewHostParsing()
throws java.lang.Exception
java.lang.Exception@Test
public void testCompression()
throws java.lang.Exception
java.lang.Exception@Test
public void testIsLocal()
throws java.lang.Exception
java.lang.Exception@Test
public void testReadOnly56()
throws java.lang.Exception
java.lang.Exception@Test
public void testIPv6()
throws java.lang.Exception
java.lang.Exception@Test public void testDriverAcceptsURLNullArgument()
@Test
public void testDriverConnectNullArgument()
throws java.lang.Exception
java.lang.Exception@Test
public void testDriverConnectPropertiesPrecedence()
throws java.lang.Exception
java.lang.Exception@Test
public void testSupportsRefCursors()
throws java.lang.Exception
java.lang.Exception@Test
public void testEnableEscapeProcessing()
throws java.lang.Exception
java.lang.Exception@Test
public void testDecoratorsChain()
throws java.lang.Exception
java.lang.Exception@Test
public void testUserRequireSSL()
throws java.lang.Exception
java.lang.Exception@Test
public void testUserRequireX509()
throws java.lang.Exception
java.lang.Exception@Test
public void testSslConnectionOptions()
throws java.lang.Exception
java.lang.Exception@Test
public void testFallbackToSystemTrustStore()
throws java.lang.Exception
java.lang.Exception@Test
public void testFallbackToSystemKeyStore()
throws java.lang.Exception
java.lang.Exception@Test
public void testAllowLoadLocalInfileInPath()
throws java.lang.Exception
java.lang.Exceptionprivate void testAllowLoadLocalInfileInPathCheckAndDelete()
throws java.lang.Exception
java.lang.Exception@Test
public void testTimeoutErrors()
throws java.lang.Exception
java.lang.Exception@Test
public void testTLSVersionRemoval()
throws java.lang.Exception
java.lang.Exception@Test
public void testTSLConflictingOptions()
throws java.lang.Exception
java.lang.Exception