assertEquals(value, timeSliceValue);
}
public void testTimeSlice_a() throws Exception {
int value = 8000;
NetworkServerControl server = new NetworkServerControl(InetAddress.getLocalHost(),TestConfiguration.getCurrent().getPort());
String[] timesliceCmd5 = new String[]{"org.apache.derby.drda.NetworkServerControl",
"timeslice", "8000","-p", String.valueOf(TestConfiguration.getCurrent().getPort())};
assertExecJavaCmdAsExpected(new String[]{"Time slice changed to 8000."}, timesliceCmd5, 0);
int timeSliceValue = server.getTimeSlice();
assertEquals(value, timeSliceValue);
String[] timesliceCmd6 = new String[]{"org.apache.derby.drda.NetworkServerControl",
"timeslice", "a"};
assertExecJavaCmdAsExpected(new String[]{"Invalid value, a, for timeslice.",
"Usage: NetworkServerControl <commands> ",
"Commands:",
"start [-h <host>] [-p <portnumber>] [-noSecurityManager] [-ssl <sslmode>]",
"shutdown [-h <host>][-p <portnumber>] [-ssl <sslmode>] [-user <username>] [-password <password>]",
"ping [-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"sysinfo [-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"runtimeinfo [-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"logconnections {on|off}[-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"maxthreads <max>[-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"trace {on|off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]",
"tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]"}, timesliceCmd6, 1);
timeSliceValue = server.getTimeSlice();
assertEquals(value, timeSliceValue);
}