Package org.h2.test.synth
Class TestHaltApp
- java.lang.Object
-
- org.h2.test.TestBase
-
- org.h2.test.synth.TestHalt
-
- org.h2.test.synth.TestHaltApp
-
-
Constructor Summary
Constructors Constructor Description TestHaltApp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcontrollerCheckAfterCrash()This method is called after a simulated crash.protected voidcontrollerInit()Initialize the database.protected voidcontrollerWaitAfterAppStart()Wait after the application has been started.protected voidexecute(java.sql.Statement stat, java.lang.String sql)Execute the statement.static voidmain(java.lang.String... args)This method is called when executing this application from the command line.protected voidprocessAppRun()Run the application code.protected voidprocessAppStart()Initialize the application.-
Methods inherited from class org.h2.test.synth.TestHalt
disconnect, getRandomString, init, test, traceOperation, traceOperation
-
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
-
-
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.lang.ExceptionThis 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.SQLExceptionDescription copied from class:org.h2.test.TestBaseExecute the statement.- Overrides:
executein classorg.h2.test.TestBase- Parameters:
stat- the statementsql- the SQL command- Throws:
java.sql.SQLException
-
controllerInit
protected void controllerInit() throws java.sql.SQLExceptionInitialize the database.- Throws:
java.sql.SQLException
-
controllerWaitAfterAppStart
protected void controllerWaitAfterAppStart() throws java.lang.ExceptionWait after the application has been started.- Throws:
java.lang.Exception
-
controllerCheckAfterCrash
protected void controllerCheckAfterCrash() throws java.sql.SQLExceptionThis 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.SQLExceptionInitialize the application.- Throws:
java.sql.SQLException
-
processAppRun
protected void processAppRun() throws java.sql.SQLExceptionRun the application code.- Throws:
java.sql.SQLException
-
-