public class TestListener extends TestBase implements DatabaseEventListener
TestBase.ChildBASE_TEST_DIR, config, start, uniqueIdSTATE_BACKUP_FILE, STATE_CREATE_INDEX, STATE_RECONNECTED, STATE_RECOVER, STATE_SCAN_FILE, STATE_STATEMENT_END, STATE_STATEMENT_PROGRESS, STATE_STATEMENT_START| Constructor and Description |
|---|
TestListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
closingDatabase()
This method is called before the database is closed normally.
|
void |
exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
This method is called if an exception occurred.
|
void |
init(java.lang.String url)
This method is called just after creating the object.
|
static void |
main(java.lang.String... a)
Run just this test.
|
void |
opened()
This method is called after the database has been opened.
|
void |
setProgress(int state,
java.lang.String name,
int current,
int max)
This method is called for long running events, such as recovering,
scanning a file or building an index.
|
void |
test()
This method will be called by the test framework.
|
assertContains, assertEqualDatabases, assertEqualReaders, assertEquals, assertEquals, 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, assertThrows, assertTrue, assertTrue, buildChild, crash, createCaller, createClassProxy, createFailingStream, deleteDb, deleteDb, eatMemory, execute, execute, fail, fail, freeMemory, getBaseDir, getClassPath, getConnection, getConnection, getFilePassword, getMemoryUsed, getMemoryUsedBytes, getPassword, getPassword, getSize, getTestDir, getTestName, getURL, getUser, init, init, logError, logErrorMessage, println, printTime, printTimeMemory, readString, runTest, startServerIfRequired, throwException, trace, trace, traceMemorypublic static void main(java.lang.String... a)
throws java.lang.Exception
a - ignoredjava.lang.Exceptionpublic void test()
throws java.sql.SQLException
TestBasepublic void exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
DatabaseEventListenerexceptionThrown in interface DatabaseEventListenere - the exceptionsql - the SQL statementpublic void setProgress(int state,
java.lang.String name,
int current,
int max)
DatabaseEventListenerMore states might be added in future versions, therefore implementations should silently ignore states that they don't understand.
setProgress in interface DatabaseEventListenerstate - the statename - the object namecurrent - the current positionmax - the highest possible value (might be 0)public void closingDatabase()
DatabaseEventListenerclosingDatabase in interface DatabaseEventListenerpublic void init(java.lang.String url)
DatabaseEventListenerinit in interface DatabaseEventListenerurl - - the database URLpublic void opened()
DatabaseEventListeneropened in interface DatabaseEventListener