public class StressMultiTest extends BaseJDBCTestCase
Modifier and Type | Class and Description |
---|---|
(package private) class |
StressMultiTest.StressMultiRunnable
This subclass contains the actual stresstests that will be run in
multiple threads.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
complete
Setting this will cause the threads to terminate normally.
|
private static boolean |
DEBUG
Force verbosity, used for debugging.
|
private static int |
MINUTES
The number of minutes the test will run.
|
private java.util.Random |
rnd |
private java.lang.Thread[] |
threads |
private static int |
THREADS
The number of threads the test will run.
|
private static java.lang.String |
THREADSMINUTES |
private java.lang.Throwable |
thrown
This holds the first throwable thrown by by any of the threads,
and will thrown as the cause of failure for the fixture.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
StressMultiTest(java.lang.String s) |
Modifier and Type | Method and Description |
---|---|
static junit.framework.Test |
embeddedSuite(int threads,
int minutes)
Get at testsuite that runs only the embedded suite with
the given number of threads for the given number of minutes.
|
private void |
handleException(java.lang.Throwable t,
java.lang.String message) |
private static junit.framework.Test |
newCleanDatabase(junit.framework.Test s) |
protected void |
runTestCaseRunnables(StressMultiTest.StressMultiRunnable[] runnables) |
void |
setUp() |
static junit.framework.Test |
suite()
Set up the testsuite to run in embedded, client and encryption mode.
|
static junit.framework.Test |
suite(int threads,
int minutes)
Get a testsuite that runs all the 3 runs (embedded, client and encrypted)
with the given number of threads for the given number of minutes.
|
void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testStressMulti()
This is the actual fixture run by the JUnit framework.
|
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
private static int THREADS
private static int MINUTES
private static final java.lang.String THREADSMINUTES
private static boolean DEBUG
private java.lang.Throwable thrown
private java.lang.Thread[] threads
private java.util.Random rnd
private boolean complete
public static junit.framework.Test suite()
public static junit.framework.Test suite(int threads, int minutes)
threads
- minutes
- THREADS
and
MINUTES
public static junit.framework.Test embeddedSuite(int threads, int minutes)
threads
- minutes
- private static junit.framework.Test newCleanDatabase(junit.framework.Test s)
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testStressMulti() throws java.lang.Throwable
java.lang.Throwable
protected void runTestCaseRunnables(StressMultiTest.StressMultiRunnable[] runnables)
private void handleException(java.lang.Throwable t, java.lang.String message)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.