public class RuntimeInfoTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static java.util.Locale |
englishLocale |
private static java.util.Locale |
germanLocale |
private static java.util.HashMap<java.util.Locale,java.util.HashMap<java.lang.String,java.lang.String>> |
outputs |
private static java.lang.String |
POLICY_FILE_NAME |
private static java.lang.String[] |
RuntimeinfoCmd |
private static java.lang.String[] |
RuntimeinfoLocaleCmd |
private static java.lang.String |
stdout_err_tags |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
RuntimeInfoTest(java.lang.String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private static junit.framework.Test |
decorateTest(java.util.Locale serverLocale,
java.lang.String testName)
Decorate a test with SecurityManagerSetup, clientServersuite, and
SupportFilesSetup.
|
static java.sql.PreparedStatement |
prepareAndExecuteQuery(java.sql.Connection conn,
java.lang.String sql) |
private void |
printIfVerbose(java.lang.String name,
java.lang.String s)
Prints strings to System.out to make it easier to update the tests
when the output changes.
|
private java.lang.String |
sed(java.lang.String s)
Replace memory values in the output string
Removes output tags for STDOUT and STDERR from readProcessOutput
Also trims the string to make it easier to compare.
|
static junit.framework.Test |
suite()
Creates a suite with two testcases, with and without some extra
system properties.
|
void |
testRunTests()
This is the wrapper that calls the x_tests in order.
|
void |
testRuntimeInfoWithLongValues()
Regression test case for DERBY-6456, which caused an infinite loop if
the runtimeinfo output was more than 32KB.
|
void |
x_testRuntimeInfoAfterConnClose()
once more after closing the connections
- by calling NetworkServerControl.getRuntimeInfo
|
void |
x_testRuntimeInfoLocale()
Test runtimeinfo w/ foreign (non-English) locale
|
void |
x_testRuntimeInfoWithActiveConn()
Test runtimeinfo
|
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, tearDown, 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, setUp, toString
private static java.lang.String[] RuntimeinfoCmd
private static java.lang.String[] RuntimeinfoLocaleCmd
private static final java.lang.String POLICY_FILE_NAME
private static final java.util.Locale englishLocale
private static final java.util.Locale germanLocale
private static final java.lang.String stdout_err_tags
private static final java.util.HashMap<java.util.Locale,java.util.HashMap<java.lang.String,java.lang.String>> outputs
public RuntimeInfoTest(java.lang.String name)
name
- public static junit.framework.Test suite()
public void testRunTests() throws java.lang.Exception
java.lang.Exception
public void x_testRuntimeInfoWithActiveConn() throws java.lang.Exception
java.lang.Exception
public void x_testRuntimeInfoLocale() throws java.lang.Exception
java.lang.Exception
public void x_testRuntimeInfoAfterConnClose() throws java.lang.Exception
java.lang.Exception
public void testRuntimeInfoWithLongValues() throws java.lang.Exception
java.lang.Exception
public static java.sql.PreparedStatement prepareAndExecuteQuery(java.sql.Connection conn, java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
private java.lang.String sed(java.lang.String s)
s
- the string to remove lines fromprivate void printIfVerbose(java.lang.String name, java.lang.String s)
name
- just a label to identify the strings
- the string to be printedprivate static junit.framework.Test decorateTest(java.util.Locale serverLocale, java.lang.String testName)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.