On 11/17/05, Daniel John Debrunner <[EMAIL PROTECTED] > wrote:
The test harness can run tests within the same jvm if useprocess=false.
This is set for the nist suite, so that all the sub-scripts are run in a
single JVM, mainly for performance reasons.

I'm looking at the code in RunTest.java so I can add security manager to
this in-process mode.

The buildTestCommand() method is called regardless of the setting of
useprocess, though it seems its result is only used for useprocess=true.
Thus it seems that the call to buildTestCommand could move into the same
if (useprocess) block around line 438.

This leads me to the question, it seems buildTestCommand() performs a
some amount of setup through property setting with -D that does not
occur when running in process (useprocess=false).
Apart from the security properties, the console encoding is set in
buildTestCommand(), but there doesn't seem to be a corresponding setting
in the in-process way.

Is this intentional, or a source for concern?

Thanks,
Dan.
 
I need useprocess also for DERBY-413...:-)
 
I think it is like this - someone please correct me if it looks I'm off...

Setting encoding is being done in both createPropString() and buildTestCommand(). This is needed because when useprocess is false, the properties need to be passed on to the resulting process that will actually run the test with -D, not just put out to the existing properties. So, the result from createPropString is used both directly in execTestProcess() and indirectly, via buildtestCommand() in execTestNoProcess(). When there is no separate process kicked off, test harness classes that require encoding info (and other details) pick the settings up directly from the properties string. So, encoding and other settings are being set in two places, but both should get picked up in different ways with and without useprocess.
 
This also implies that any tests that need special flags cannot be run with useprocess = false.
 
I think you're right that buildtestCommand can be moved inside the if(useprocess) block.
 
Myrna 

Reply via email to