Attaching a patch that makes ReplicationRun use
BaseTestCase.execJavaCmd() to run local commands. The patch is built
on top of the patch for
DERBY-5783, so it can't be committed until
that patch has been checked in.
The patch rearranges the code so that Runtime.exec() is only called
two places in the code (one for remote processes, and one for local
processes), and replaces the call that creates the local processes
with a call to BaseTestCase.execJavaCmd().
The replication tests passed with the patch. Running the full
regression test suite now.
- Overloaded execJavaCmd() with a variant that allows specifying the
- Added helper methods toStringArray() and splice() to replace some
repeated operations in ReplicationRun.
- Removed unused method NIOcopy.
- Moved body of runUserCommand() method into runUserCommandLocally()
to make it clearer that it was never used for remote processes.
- Renamed runUserCommandInThread() runUserCommandInThreadLocally() to
make it clearer that it was only for local processes, and to make
method naming consistent with that of the methods that start remote
- Made runUserCommandInThreadLocally() and
runUserCommandInThreadRemotely() wrap runUserCommandLocally() and
runUserCommandRemotely(), respectively, to reduce the number of
places that call exec(), and to reduce the total amount of code.
- Made startServer() call runUserCommandInThreadLocally() and
runUserCommandInThreadRemotely() instead of calling exec() directly,
and made stopServer() call runUserCommandLocally() and
runUserCommandRemotely() for the same reason.
- Changed signatures of runUserCommand[InThread]Locally() to take the
command as an array instead of a flat string, so that it could
easily be passed on to BaseTestCase.execJavaCmd().
- Made runUserCommandLocally() call BaseTestCase.execJavaCmd().