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 |
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 |
private static java.lang.String |
TARGET_POLICY_FILE_NAME |
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.
|
private java.lang.String |
makePolicyName()
Construct the name of the server policy file.
|
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, 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, tearDown, 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, setUp, toStringprivate static java.lang.String[] RuntimeinfoCmd
private static java.lang.String[] RuntimeinfoLocaleCmd
private static java.lang.String POLICY_FILE_NAME
private static java.lang.String TARGET_POLICY_FILE_NAME
private static java.util.Locale englishLocale
private static java.util.Locale germanLocale
private static java.lang.String stdout_err_tags
private static final java.util.HashMap outputs
public RuntimeInfoTest(java.lang.String name)
name - public static junit.framework.Test suite()
public void testRunTests()
throws java.lang.Exception
java.lang.Exceptionpublic void x_testRuntimeInfoWithActiveConn()
throws java.lang.Exception
java.lang.Exceptionpublic void x_testRuntimeInfoLocale()
throws java.lang.Exception
java.lang.Exceptionpublic void x_testRuntimeInfoAfterConnClose()
throws java.lang.Exception
java.lang.Exceptionpublic void testRuntimeInfoWithLongValues()
throws java.lang.Exception
java.lang.Exceptionpublic static java.sql.PreparedStatement prepareAndExecuteQuery(java.sql.Connection conn,
java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionprivate 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 java.lang.String makePolicyName()
private static junit.framework.Test decorateTest(java.util.Locale serverLocale,
java.lang.String testName)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.