org.h2.test.synth
Class TestHaltApp

java.lang.Object
  extended by org.h2.test.TestBase
      extended by org.h2.test.synth.TestHalt
          extended by org.h2.test.synth.TestHaltApp

public class TestHaltApp
extends TestHalt

The application code for the TestHalt application.


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, TEMP_DIR, uniqueId
 
Constructor Summary
TestHaltApp()
           
 
Method Summary
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.
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.synth.TestHalt
disconnect, getRandomString, init, test, traceOperation, traceOperation
 
Methods inherited from class org.h2.test.TestBase
assertContains, assertEqualDatabases, assertEqualReaders, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualStreams, assertFalse, assertFalse, assertKnownException, assertKnownException, assertNull, assertResult, assertResultRowCount, assertResultSetMeta, assertResultSetOrdered, assertSingleValue, assertSmaller, assertStartsWith, assertThrows, assertThrows, assertThrows, assertTrue, assertTrue, crash, createCaller, createCaller, createClassProxy, deleteDb, deleteDb, eatMemory, fail, fail, freeMemory, getBaseDir, getClassPath, getConnection, getConnection, getFilePassword, getMemoryUsed, getPassword, getPassword, getSize, getTestDir, getURL, getUser, init, logError, println, printTime, printTimeMemory, readString, runTest, startServerIfRequired, testCase, 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

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