On 4/18/06, John H. Embretsen (JIRA) <[email protected]> wrote:
   [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12374941 ]

John H. Embretsen commented on DERBY-1141:
------------------------------------------
 
Thanks for reviewing this.

I think it is a good thing getting more tests/suites to run with useprocess=false, as this may improve running time and help debugging, among other things. So I definitely think this work has value for the Derby community.

I have not studied in detail all aspects of 'DERBY-1141_20060413.diff' (henceforth "the patch"), but I have a couple of minor comments - mostly comments about the comments, actually...
 
[snip details...]
Your comments about the comments - or lack thereof - are all founded. I probably need to make a new patch because in the work for DERBY-658 some of these files were also modified, and I'll add more and hopefully better comments.
 

JUnit and useprocess=false:
----------------------------------------------------

Some may be surprised to find that junit tests are run in a separate process by default (instead of being skipped) when useprocess=false. However, I think I see some advantages of doing it this way, so I accept (a bit reluctantly, perhaps) this behavior for now.

In the patch I also find:

-        if ( useprocess )
+           // Always create a process if testType is junit, otherwise testRunner
+           // would exit a suite prematurely, and we can't debug that anyway and
+           // they should run quick anyway.
+        if ( useprocess || (!useprocess && testType.equals("junit")))

I'm not sure I understand/remember exactly why junit tests cannot be run with useprocess=false ( i.e. why "testRunner" (I assume this means junit.*ui.TestRunner) would exit a suite prematurely). Feel free to educate me on this subject (otherwise I guess I'll look into it myself when time permits) ;)
 
 
Yes, I was referring to junit.*ui.TestRunner. I wanted to enable as many test as possible when running useprocess=false, and I thought skipping the junit test would be an increasingly bad idea as we'd get more and more junit tests...
 
So I experimented running the junit test as a separate process (I just copied how they're run when useprocess=true (the default)), the first junit test ran successfully and that was all that ran, the entore RunSuite process just stopped. I assumed that TestRunner must be doing a System.exit() somewhere. Maybe I was off with that conclusion/assumption...
 
I think for now, I will make the harness skip junit tests when useprocess=false. I'll double check the code to make sure there's no left-over comments suggesting they're getting run.
 
Myrna
 
 

Reply via email to