public class NetworkServerControlApiTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
NON_ASCII_PASSWORD |
private static java.lang.String |
NON_ASCII_USER |
private static java.lang.String |
POLICY_FILE_NAME |
private static java.lang.String |
TARGET_POLICY_FILE_NAME |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
NetworkServerControlApiTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private static junit.framework.Test |
decorateShutdownTest(java.lang.String testName,
java.lang.String user,
java.lang.String password)
Decorate a test case that will attempt to shut down a network server
using the supplied credentials.
|
private static junit.framework.TestSuite |
decorateSystemPropertyTests(junit.framework.TestSuite suite) |
private static junit.framework.Test |
decorateTest()
Add decorators to a test run.
|
private boolean |
fileExists(java.lang.String filename) |
private java.lang.String |
makeServerPolicyName()
Construct the name of the server policy file.
|
private java.net.InetAddress |
privInetAddressGetByName(java.lang.String host)
Wraps InitAddress.getByName in privilege block.
|
static junit.framework.Test |
suite() |
void |
test_01_WrongUsage()
Test other commands.
|
void |
test_02_TraceCommands() |
void |
test_03_Ping()
Test NetworkServerControl ping command.
|
void |
test_04_MaxThreads_0() |
void |
test_05_MaxThreads_Neg1() |
void |
test_06_MaxThreads_Neg12()
Calling with -12 should fail.
|
void |
test_07_MaxThreads_2147483647() |
void |
test_08_MaxThreads_9000() |
void |
test_09_MaxThreads_Invalid()
Calling with 'a' causes a NFE which results in an error.
|
void |
test_10_MaxThreadsCallable_0() |
void |
test_11_MaxThreadsCallable_Neg1() |
void |
test_12_MaxThreadsCallable_Neg12()
Test should throw an exception.
|
void |
test_13_MaxThreadsCallable_2147483647() |
void |
test_14_MaxThreadsCallable_9000() |
void |
test_15_TimeSlice_0() |
void |
test_16_TimeSlice_Neg1() |
void |
test_17_TimeSlice_Neg12() |
void |
test_18_TimeSlice_2147483647() |
void |
test_19_TimeSlice_9000() |
void |
test_20_TimeSlice_a() |
void |
test_21_TimeSliceCallable_0() |
void |
test_22_TimeSliceCallable_Neg1() |
void |
test_23_TimeSliceCallable_Neg2() |
void |
test_24_TimeSliceCallable_2147483647() |
void |
test_25_TimeSliceCallable_9000() |
void |
xtestShutdownWithNonASCIICredentials()
Run the shutdown command with credentials that contain non-ASCII
characters.
|
void |
xtestTraceSystemPropertiesHasPermission()
Test tracing with system properties when we have permissions
to write to the trace directory.
|
void |
xtestTraceSystemPropertiesNoPermission()
Test tracing with system properties if we have no permission
to write to the trace directory.
|
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 final java.lang.String NON_ASCII_USER
private static final java.lang.String NON_ASCII_PASSWORD
private static java.lang.String POLICY_FILE_NAME
private static java.lang.String TARGET_POLICY_FILE_NAME
public NetworkServerControlApiTest(java.lang.String name)
public void test_01_WrongUsage()
throws java.lang.Exception
java.lang.Exceptionpublic void test_02_TraceCommands()
throws java.lang.Exception
java.lang.Exceptionpublic void xtestTraceSystemPropertiesNoPermission()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void xtestTraceSystemPropertiesHasPermission()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void xtestShutdownWithNonASCIICredentials()
throws java.lang.Exception
java.lang.Exceptionpublic void test_03_Ping()
throws java.lang.Exception
java.lang.Exceptionprivate java.net.InetAddress privInetAddressGetByName(java.lang.String host)
throws java.net.UnknownHostException
host - host to resolvejava.net.UnknownHostExceptionprivate boolean fileExists(java.lang.String filename)
private java.lang.String makeServerPolicyName()
private static junit.framework.Test decorateTest()
public static junit.framework.Test suite()
private static junit.framework.TestSuite decorateSystemPropertyTests(junit.framework.TestSuite suite)
private static junit.framework.Test decorateShutdownTest(java.lang.String testName,
java.lang.String user,
java.lang.String password)
testName - name of the test case to decorateuser - the user that should attempt to shut down the serverpassword - the password to be used when shutting down the serverpublic void test_04_MaxThreads_0()
throws java.lang.Exception
java.lang.Exceptionpublic void test_05_MaxThreads_Neg1()
throws java.lang.Exception
java.lang.Exceptionpublic void test_06_MaxThreads_Neg12()
throws java.lang.Exception
java.lang.Exceptionpublic void test_07_MaxThreads_2147483647()
throws java.lang.Exception
java.lang.Exceptionpublic void test_08_MaxThreads_9000()
throws java.lang.Exception
java.lang.Exceptionpublic void test_09_MaxThreads_Invalid()
throws java.lang.Exception
java.lang.Exceptionpublic void test_10_MaxThreadsCallable_0()
throws java.lang.Exception
java.lang.Exceptionpublic void test_11_MaxThreadsCallable_Neg1()
throws java.lang.Exception
java.lang.Exceptionpublic void test_12_MaxThreadsCallable_Neg12()
throws java.lang.Exception
java.lang.Exceptionpublic void test_13_MaxThreadsCallable_2147483647()
throws java.lang.Exception
java.lang.Exceptionpublic void test_14_MaxThreadsCallable_9000()
throws java.lang.Exception
java.lang.Exceptionpublic void test_15_TimeSlice_0()
throws java.lang.Exception
java.lang.Exceptionpublic void test_16_TimeSlice_Neg1()
throws java.lang.Exception
java.lang.Exceptionpublic void test_17_TimeSlice_Neg12()
throws java.lang.Exception
java.lang.Exceptionpublic void test_18_TimeSlice_2147483647()
throws java.lang.Exception
java.lang.Exceptionpublic void test_19_TimeSlice_9000()
throws java.lang.Exception
java.lang.Exceptionpublic void test_20_TimeSlice_a()
throws java.lang.Exception
java.lang.Exceptionpublic void test_21_TimeSliceCallable_0()
throws java.lang.Exception
java.lang.Exceptionpublic void test_22_TimeSliceCallable_Neg1()
throws java.lang.Exception
java.lang.Exceptionpublic void test_23_TimeSliceCallable_Neg2()
throws java.lang.Exception
java.lang.Exceptionpublic void test_24_TimeSliceCallable_2147483647()
throws java.lang.Exception
java.lang.Exceptionpublic void test_25_TimeSliceCallable_9000()
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.