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 |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
NetworkServerControlApiTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
byteArrayToHex(byte[] ba,
int l) |
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 BaseTestSuite |
decorateSystemPropertyTests(BaseTestSuite suite) |
private static junit.framework.Test |
decorateTest()
Add decorators to a test run.
|
private boolean |
fileExists(java.lang.String filename) |
private java.net.Socket |
privilegedClientSocket(java.lang.String host,
int port) |
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_args() |
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() |
private java.lang.String |
tryPingDbError(java.lang.String d,
java.lang.String u,
java.lang.String p) |
private java.lang.String |
tryPingDbOK(java.lang.String d,
java.lang.String u,
java.lang.String p) |
private java.lang.String |
tryPingDbTest(int rc,
java.lang.String d,
java.lang.String u,
java.lang.String p) |
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, 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 final java.lang.String NON_ASCII_USER
private static final java.lang.String NON_ASCII_PASSWORD
private static final java.lang.String POLICY_FILE_NAME
public NetworkServerControlApiTest(java.lang.String name)
public void test_01_WrongUsage() throws java.lang.Exception
java.lang.Exception
public void test_02_TraceCommands() throws java.lang.Exception
java.lang.Exception
public void xtestTraceSystemPropertiesNoPermission() throws java.sql.SQLException
java.sql.SQLException
public void xtestTraceSystemPropertiesHasPermission() throws java.sql.SQLException
java.sql.SQLException
public void xtestShutdownWithNonASCIICredentials() throws java.lang.Exception
java.lang.Exception
public void test_03_Ping() throws java.lang.Exception
java.lang.Exception
public void test_03_ping_args() throws java.lang.Exception
java.lang.Exception
private java.net.Socket privilegedClientSocket(java.lang.String host, int port) throws java.lang.Exception
java.lang.Exception
private static java.lang.String byteArrayToHex(byte[] ba, int l)
private java.lang.String tryPingDbError(java.lang.String d, java.lang.String u, java.lang.String p) throws java.lang.Exception
java.lang.Exception
private java.lang.String tryPingDbOK(java.lang.String d, java.lang.String u, java.lang.String p) throws java.lang.Exception
java.lang.Exception
private java.lang.String tryPingDbTest(int rc, java.lang.String d, java.lang.String u, java.lang.String p) throws java.lang.Exception
java.lang.Exception
private java.net.InetAddress privInetAddressGetByName(java.lang.String host) throws java.net.UnknownHostException
host
- host to resolvejava.net.UnknownHostException
private boolean fileExists(java.lang.String filename)
private static junit.framework.Test decorateTest()
public static junit.framework.Test suite()
private static BaseTestSuite decorateSystemPropertyTests(BaseTestSuite 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.Exception
public void test_05_MaxThreads_Neg1() throws java.lang.Exception
java.lang.Exception
public void test_06_MaxThreads_Neg12() throws java.lang.Exception
java.lang.Exception
public void test_07_MaxThreads_2147483647() throws java.lang.Exception
java.lang.Exception
public void test_08_MaxThreads_9000() throws java.lang.Exception
java.lang.Exception
public void test_09_MaxThreads_Invalid() throws java.lang.Exception
java.lang.Exception
public void test_10_MaxThreadsCallable_0() throws java.lang.Exception
java.lang.Exception
public void test_11_MaxThreadsCallable_Neg1() throws java.lang.Exception
java.lang.Exception
public void test_12_MaxThreadsCallable_Neg12() throws java.lang.Exception
java.lang.Exception
public void test_13_MaxThreadsCallable_2147483647() throws java.lang.Exception
java.lang.Exception
public void test_14_MaxThreadsCallable_9000() throws java.lang.Exception
java.lang.Exception
public void test_15_TimeSlice_0() throws java.lang.Exception
java.lang.Exception
public void test_16_TimeSlice_Neg1() throws java.lang.Exception
java.lang.Exception
public void test_17_TimeSlice_Neg12() throws java.lang.Exception
java.lang.Exception
public void test_18_TimeSlice_2147483647() throws java.lang.Exception
java.lang.Exception
public void test_19_TimeSlice_9000() throws java.lang.Exception
java.lang.Exception
public void test_20_TimeSlice_a() throws java.lang.Exception
java.lang.Exception
public void test_21_TimeSliceCallable_0() throws java.lang.Exception
java.lang.Exception
public void test_22_TimeSliceCallable_Neg1() throws java.lang.Exception
java.lang.Exception
public void test_23_TimeSliceCallable_Neg2() throws java.lang.Exception
java.lang.Exception
public void test_24_TimeSliceCallable_2147483647() throws java.lang.Exception
java.lang.Exception
public void test_25_TimeSliceCallable_9000() throws java.lang.Exception
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.