Package org.h2.test.synth
Class TestHaltApp
java.lang.Object
org.h2.test.TestBase
org.h2.test.synth.TestHalt
org.h2.test.synth.TestHaltApp
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 -
Field Summary
Fields inherited from class org.h2.test.synth.TestHalt
conn, FLAG_LOBS, FLAG_NO_DELAY, flags, OP_DELETE, OP_INSERT, OP_SELECT, OP_UPDATE, operations, random, valueFields inherited from class org.h2.test.TestBase
BASE_TEST_DIR, config, start, uniqueId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method is called after a simulated crash.protected voidInitialize the database.protected voidWait after the application has been started.protected voidExecute the statement.static voidThis method is called when executing this application from the command line.protected voidRun the application code.protected voidInitialize the application.Methods inherited from class org.h2.test.synth.TestHalt
disconnect, getRandomString, init, test, traceOperation, traceOperationMethods 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
-
Constructor Details
-
TestHaltApp
public TestHaltApp()
-
-
Method Details
-
main
This method is called when executing this application from the command line.- Parameters:
args- the command line parameters- Throws:
Exception
-
execute
Description copied from class:org.h2.test.TestBaseExecute the statement.- Overrides:
executein classorg.h2.test.TestBase- Parameters:
stat- the statementsql- the SQL command- Throws:
SQLException
-
controllerInit
Initialize the database.- Throws:
SQLException
-
controllerWaitAfterAppStart
Wait after the application has been started.- Throws:
Exception
-
controllerCheckAfterCrash
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:
SQLException- if the data is not consistent.
-
processAppStart
Initialize the application.- Throws:
SQLException
-
processAppRun
Run the application code.- Throws:
SQLException
-