Package org.h2.test.synth

# Class TestHaltApp

java.lang.Object
org.h2.test.TestBase
org.h2.test.synth.TestHalt
org.h2.test.synth.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`

## 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, value`

### Fields inherited from class org.h2.test.TestBase

`BASE_TEST_DIR, config, start, uniqueId`

## Constructor Summary

Constructors
Constructor
Description
`TestHaltApp()`

## Method Summary

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(Statement stat, String sql)`
Execute the statement.
`static void`
`main(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.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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TestHaltApp

public TestHaltApp()

## Method Details

### main

public static void main(String... args) throws Exception
This method is called when executing this application from the command line.

Parameters:
  `args` - the command line parameters
Throws:
  `Exception`

### execute

protected void execute(Statement stat, String sql) throws 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:
  `SQLException`

### controllerInit

protected void controllerInit() throws SQLException
Initialize the database.

Throws:
  `SQLException`

### controllerWaitAfterAppStart

protected void controllerWaitAfterAppStart() throws Exception
Wait after the application has been started.

Throws:
  `Exception`

### controllerCheckAfterCrash

protected void controllerCheckAfterCrash() throws 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:
  `SQLException` - if the data is not consistent.

### processAppStart

protected void processAppStart() throws SQLException
Initialize the application.

Throws:
  `SQLException`

### processAppRun

protected void processAppRun() throws SQLException
Run the application code.

Throws:
  `SQLException`