db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: Test Harness useprocess=false question
Date Thu, 17 Nov 2005 23:28:57 GMT
On 11/17/05, Daniel John Debrunner <djd@debrunners.com> 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

Mime
View raw message