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, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, toStringprivate 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.TestCasejava.lang.Exceptionpublic void tearDown()
throws java.lang.Exception
BaseJDBCTestCasetearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic void testStressMulti()
throws java.lang.Throwable
java.lang.Throwableprotected void runTestCaseRunnables(StressMultiTest.StressMultiRunnable[] runnables)
private void handleException(java.lang.Throwable t,
java.lang.String message)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.