Class SplunkAdapterTest


  • public class SplunkAdapterTest
    extends java.lang.Object
    Unit test of the Calcite adapter for Splunk.
    • Field Detail

      • SQL_STRINGS

        static final java.lang.String[] SQL_STRINGS
      • ERROR_SQL_STRINGS

        static final java.lang.String[] ERROR_SQL_STRINGS
    • Constructor Detail

      • SplunkAdapterTest

        public SplunkAdapterTest()
    • Method Detail

      • enabled

        private boolean enabled()
        Whether this test is enabled. Tests are disabled unless we know that Splunk is present and loaded with the requisite data.
      • loadDriverClass

        private void loadDriverClass()
      • close

        private void close​(java.sql.Connection connection,
                           java.sql.Statement statement)
      • testVanityDriver

        public void testVanityDriver()
                              throws java.sql.SQLException
        Tests the vanity driver.
        Throws:
        java.sql.SQLException
      • testVanityDriverArgsInUrl

        public void testVanityDriverArgsInUrl()
                                       throws java.sql.SQLException
        Tests the vanity driver with properties in the URL.
        Throws:
        java.sql.SQLException
      • testSelect

        public void testSelect()
                        throws java.sql.SQLException
        Reads from a table.
        Throws:
        java.sql.SQLException
      • testSelectDistinct

        public void testSelectDistinct()
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • expect

        private static java.util.function.Function<java.sql.ResultSet,​java.lang.Void> expect​(java.lang.String... lines)
      • testSelectNonBuiltInColumn

        public void testSelectNonBuiltInColumn()
                                        throws java.sql.SQLException
        "status" is not a built-in column but we know it has some values in the test data.
        Throws:
        java.sql.SQLException
      • testJoinToJdbc

        public void testJoinToJdbc()
                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • testGroupBy

        public void testGroupBy()
                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • checkSql

        private void checkSql​(java.lang.String sql,
                              java.util.function.Function<java.sql.ResultSet,​java.lang.Void> f)
                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException