Package org.h2.store.fs

Examples of org.h2.store.fs.FileObject


        new TestStringCache().runTest(this);
        new TestStringUtils().runTest(this);
        new TestTools().runTest(this);
        new TestTraceSystem().runTest(this);
        new TestUpgrade().runTest(this);
        new TestUtils().runTest(this);
        new TestValue().runTest(this);
        new TestValueHashMap().runTest(this);
        new TestValueMemory().runTest(this);
    }
View Full Code Here


        new TestStringUtils().runTest(this);
        new TestTools().runTest(this);
        new TestTraceSystem().runTest(this);
        new TestUpgrade().runTest(this);
        new TestUtils().runTest(this);
        new TestValue().runTest(this);
        new TestValueHashMap().runTest(this);
        new TestValueMemory().runTest(this);
    }
View Full Code Here

        new TestTools().runTest(this);
        new TestTraceSystem().runTest(this);
        new TestUpgrade().runTest(this);
        new TestUtils().runTest(this);
        new TestValue().runTest(this);
        new TestValueHashMap().runTest(this);
        new TestValueMemory().runTest(this);
    }
View Full Code Here

        new TestTraceSystem().runTest(this);
        new TestUpgrade().runTest(this);
        new TestUtils().runTest(this);
        new TestValue().runTest(this);
        new TestValueHashMap().runTest(this);
        new TestValueMemory().runTest(this);
    }
View Full Code Here

     * Run all tests.
     *
     * @param args the command line arguments
     */
    public static void main(String... args) throws Exception {
        OutputCatcher catcher = OutputCatcher.start();
        run(args);
        catcher.stop();
        catcher.writeTo("Test Output", "docs/html/testOutput.html");
    }
View Full Code Here

                  log.debug( "Starting remote h2 db with port : " + port );
                  final String[] args = new String[] {
                      "-baseDir", dbPath.getAbsolutePath(),
                      "-tcpPort", String.valueOf(port),
                      "-tcpAllowOthers","" }; //  need the extra empty string or a exception is thrown by H2
                  final Server server = Server.createTcpServer(args) ;
                  server.start() ;
                  setRemoteServer(server);
              }
              catch (Exception e)
              {
                 log.error("Failed to start database", e);
View Full Code Here

   /**
    * Stop the remote database.
    */
   private void stopRemoteDatabase() throws SQLException
   {
       final Server server = getRemoteServer() ;
       if (server != null)
       {
           server.stop() ;
       }
   }
View Full Code Here

        deleteDb("autoReconnect");
    }

    private void testWrongUrl() throws Exception {
        deleteDb("autoReconnect");
        Server tcp = Server.createTcpServer().start();
        try {
            Connection conn = getConnection("jdbc:h2:" + getBaseDir() + "/autoReconnect;AUTO_SERVER=TRUE");
            assertThrows(ErrorCode.DATABASE_ALREADY_OPEN_1, this).
                    getConnection("jdbc:h2:" + getBaseDir() + "/autoReconnect;OPEN_NEW=TRUE");
            assertThrows(ErrorCode.DATABASE_ALREADY_OPEN_1, this).
                    getConnection("jdbc:h2:" + getBaseDir() + "/autoReconnect;OPEN_NEW=TRUE");
            conn.close();

            conn = getConnection("jdbc:h2:tcp://localhost/" + getBaseDir() + "/autoReconnect");
            assertThrows(ErrorCode.DATABASE_ALREADY_OPEN_1, this).
                    getConnection("jdbc:h2:" + getBaseDir() + "/autoReconnect;AUTO_SERVER=TRUE;OPEN_NEW=TRUE");
            conn.close();
        } finally {
            tcp.stop();
        }
    }
View Full Code Here

        TestBase.createCaller().init().test();
    }

    public void test() throws SQLException {
        deleteDb("test");
        Server server = Server.createPgServer("-baseDir", getBaseDir(), "-pgPort", "5535", "-pgDaemon");
        assertEquals(5535, server.getPort());
        assertEquals("Not started", server.getStatus());
        server.start();
        assertStartsWith(server.getStatus(), "PG server running at pg://");
        try {
            Class.forName("org.postgresql.Driver");
            testPgClient();
        } catch (ClassNotFoundException e) {
            println("PostgreSQL JDBC driver not found - PgServer not tested");
        } finally {
            server.stop();
        }
        deleteDb("test");
    }
View Full Code Here

     *
     * @param conn the connection
     * @return a result set
     */
    public static ResultSet simpleFunctionTable(Connection conn) {
        SimpleResultSet result = new SimpleResultSet();
        result.addColumn("A", Types.INTEGER, 0, 0);
        result.addColumn("B", Types.CHAR, 0, 0);
        result.addRow(42, 'X');
        return result;
    }
View Full Code Here

TOP

Related Classes of org.h2.store.fs.FileObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.