Class AbstractJdbcTestCase


  • public abstract class AbstractJdbcTestCase
    extends java.lang.Object
    Abstract tests for an JDBC vendor implementation.
    Author:
    Daniel Sagenschneider
    • Field Detail

      • connection

        protected java.sql.Connection connection
        Connection. Keep Connection to database for in memory databases to stay alive.
    • Constructor Detail

      • AbstractJdbcTestCase

        public AbstractJdbcTestCase()
    • Method Detail

      • cleanDatabase

        protected abstract void cleanDatabase​(java.sql.Connection connection)
                                       throws java.sql.SQLException
        Cleans the database.
        Parameters:
        connection - Connection.
        Throws:
        java.sql.SQLException - On failure to clean up the database.
      • setUp

        @BeforeEach
        protected void setUp()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDown

        @AfterEach
        protected void tearDown()
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadOptionalConnectionSpecification

        protected void loadOptionalConnectionSpecification​(java.util.Properties properties)
        Enables adding additional Connection properties to specification.
        Parameters:
        properties - Properties to be loaded with additional specification.
      • loadOptionalDataSourceSpecification

        protected void loadOptionalDataSourceSpecification​(java.util.Properties properties)
        Enables adding additional DataSource properties to specification.
        Parameters:
        properties - Properties to be loaded with additional specification.
      • testReadOnlyConnectionSpecification

        @Test
        public void testReadOnlyConnectionSpecification()
                                                 throws java.lang.Exception
        Ensure correct specification for read-only Connection.
        Throws:
        java.lang.Exception - On test failure.
      • testDataSourceSpecification

        @Test
        public void testDataSourceSpecification()
                                         throws java.lang.Exception
        Ensure correct specification for DataSource.
        Throws:
        java.lang.Exception - On test failure.
      • testReadOnlyType

        @Test
        public void testReadOnlyType()
                              throws java.lang.Exception
        Ensure correct type for read-only Connection.
        Throws:
        java.lang.Exception - On test failure.
      • testDataSourceType

        @Test
        public void testDataSourceType()
                                throws java.lang.Exception
        Ensure correct type for DataSource.
        Throws:
        java.lang.Exception - On test failure.
      • testReadOnlyConnectivity

        @Test
        public void testReadOnlyConnectivity()
                                      throws java.lang.Throwable
        Ensure read-only connectivity.
        Throws:
        java.lang.Throwable
      • testDataSourceConnectivity

        @Test
        public void testDataSourceConnectivity()
                                        throws java.lang.Throwable
        Ensure DataSource connectivity.
        Throws:
        java.lang.Throwable
      • testReadOnlyConnectionManagement

        @Test
        public void testReadOnlyConnectionManagement()
                                              throws java.lang.Throwable
        Ensure connection management for read-only Connection.
        Throws:
        java.lang.Exception - On test failure.
        java.lang.Throwable
      • testReadOnlyConnectionManagementViaProxy

        @Test
        public void testReadOnlyConnectionManagementViaProxy()
                                                      throws java.lang.Throwable
        Ensure connection management for read-only Connection.
        Throws:
        java.lang.Exception - On test failure.
        java.lang.Throwable
      • testDataSourceConnectionManagement

        @Test
        public void testDataSourceConnectionManagement()
                                                throws java.lang.Throwable
        Ensure connection management for DataSource.
        Throws:
        java.lang.Exception - On test failure.
        java.lang.Throwable
      • testDataSourceConnectionManagementViaProxy

        @Test
        public void testDataSourceConnectionManagementViaProxy()
                                                        throws java.lang.Throwable
        Ensure connection management for DataSource.
        Throws:
        java.lang.Exception - On test failure.
        java.lang.Throwable
      • testReadOnlyValidateConnectivity

        @Test
        public void testReadOnlyValidateConnectivity()
                                              throws java.lang.Exception
        Ensure correct type for read-only Connection.
        Throws:
        java.lang.Exception - On test failure.
      • testDataSourceValidateConnectivity

        @Test
        public void testDataSourceValidateConnectivity()
                                                throws java.lang.Exception
        Ensure correct type for DataSource.
        Throws:
        java.lang.Exception - On test failure.
      • testInsertConnectionStressWithCompiler

        public void testInsertConnectionStressWithCompiler​(org.junit.jupiter.api.TestInfo testInfo)
                                                    throws java.lang.Throwable
        Ensure can stress test against the database with compiled wrappers.
        Throws:
        java.lang.Throwable - On test failure.
      • testInsertConnectionStressWithDynamicProxy

        public void testInsertConnectionStressWithDynamicProxy​(org.junit.jupiter.api.TestInfo testInfo)
                                                        throws java.lang.Throwable
        Ensure can stress test against the database with Proxy.
        Throws:
        java.lang.Throwable - On test failure.
      • testInsertConnectionTransactionStressWithCompiler

        public void testInsertConnectionTransactionStressWithCompiler​(org.junit.jupiter.api.TestInfo testInfo)
                                                               throws java.lang.Throwable
        Ensure can stress test against the database with transactions with compiled wrappers.
        Throws:
        java.lang.Throwable - On test failure.
      • testInsertConnectionTransactionStressWithDynamicProxy

        public void testInsertConnectionTransactionStressWithDynamicProxy​(org.junit.jupiter.api.TestInfo testInfo)
                                                                   throws java.lang.Throwable
        Ensure can stress test against the database with transactions.
        Throws:
        java.lang.Throwable - On test failure.
      • testReadOnlySelectStressWithCompiler

        public void testReadOnlySelectStressWithCompiler​(org.junit.jupiter.api.TestInfo testInfo)
                                                  throws java.lang.Throwable
        Undertakes select stress for read-only Connection with compiled wrappers.
        Throws:
        java.lang.Throwable - On test failure.
      • testReadOnlySelectStressWithDynamicProxy

        public void testReadOnlySelectStressWithDynamicProxy​(org.junit.jupiter.api.TestInfo testInfo)
                                                      throws java.lang.Throwable
        Undertakes select stress for read-only Connection with Proxy.
        Throws:
        java.lang.Throwable - On test failure.
      • testDataSourceSelectStress

        public void testDataSourceSelectStress​(org.junit.jupiter.api.TestInfo testInfo)
                                        throws java.lang.Throwable
        Undertakes select stress for DataSource.
        Throws:
        java.lang.Throwable - On test failure.
      • testDataSourceSelectStressWithDynamicProxy

        public void testDataSourceSelectStressWithDynamicProxy​(org.junit.jupiter.api.TestInfo testInfo)
                                                        throws java.lang.Throwable
        Undertakes select stress for writable Connection with Proxy.
        Throws:
        java.lang.Throwable - On test failure.