Class TestHaltApp


  • public class TestHaltApp
    extends TestHalt
    The application code for the TestHalt application.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.h2.test.TestBase

        org.h2.test.TestBase.VoidCallable
    • Constructor Summary

      Constructors 
      Constructor Description
      TestHaltApp()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void controllerCheckAfterCrash()
      This method is called after a simulated crash.
      protected void controllerInit()
      Initialize the database.
      protected void controllerWaitAfterAppStart()
      Wait after the application has been started.
      protected void execute​(java.sql.Statement stat, java.lang.String sql)
      Execute the statement.
      static void main​(java.lang.String... args)
      This method is called when executing this application from the command line.
      protected void processAppRun()
      Run the application code.
      protected void processAppStart()
      Initialize the application.
      • Methods inherited from class org.h2.test.TestBase

        assertContains, assertEmpty, assertEqualDatabases, assertEqualReaders, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualStreams, assertFalse, assertFalse, assertKnownException, assertKnownException, assertNotContaining, assertNotNull, assertNotNull, assertNull, assertResult, assertResultRowCount, assertResultSetMeta, assertResultSetOrdered, assertResultSetOrdered, assertSame, assertSingleValue, assertSmaller, assertStartsWith, assertThrows, assertThrows, assertThrows, assertThrows, assertThrows, assertThrows, assertThrows, assertThrows, assertTrue, assertTrue, checkErrorCode, crash, createCaller, createFailingStream, eatMemory, execute, fail, fail, freeMemory, getBaseDir, getClassPath, getFilePassword, getJVM, getMemoryUsed, getMemoryUsedBytes, getPassword, getPassword, getPowerOffCount, getSize, getTestDir, getTestName, getUser, init, isEnabled, logError, logErrorMessage, println, printTime, printTimeMemory, readString, runTest, setPowerOffCount, testFromMain, throwException, trace, trace, traceMemory
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestHaltApp

        public TestHaltApp()
    • Method Detail

      • main

        public static void main​(java.lang.String... args)
                         throws java.lang.Exception
        This method is called when executing this application from the command line.
        Parameters:
        args - the command line parameters
        Throws:
        java.lang.Exception
      • execute

        protected void execute​(java.sql.Statement stat,
                               java.lang.String sql)
                        throws java.sql.SQLException
        Description copied from class: org.h2.test.TestBase
        Execute the statement.
        Overrides:
        execute in class org.h2.test.TestBase
        Parameters:
        stat - the statement
        sql - the SQL command
        Throws:
        java.sql.SQLException
      • controllerInit

        protected void controllerInit()
                               throws java.sql.SQLException
        Initialize the database.
        Throws:
        java.sql.SQLException
      • controllerWaitAfterAppStart

        protected void controllerWaitAfterAppStart()
                                            throws java.lang.Exception
        Wait after the application has been started.
        Throws:
        java.lang.Exception
      • controllerCheckAfterCrash

        protected void controllerCheckAfterCrash()
                                          throws java.sql.SQLException
        This method is called after a simulated crash. The method should check if the data is transactionally consistent and throw an exception if not.
        Throws:
        java.sql.SQLException - if the data is not consistent.
      • processAppStart

        protected void processAppStart()
                                throws java.sql.SQLException
        Initialize the application.
        Throws:
        java.sql.SQLException
      • processAppRun

        protected void processAppRun()
                              throws java.sql.SQLException
        Run the application code.
        Throws:
        java.sql.SQLException