On Tue, 2011-11-22 at 17:22 +0000, Neil Richards wrote: > On Tue, 2011-11-22 at 16:56 +0000, Chris Hegarty wrote: > > This change does look good. > > > > Not directly related to your changes Neil, and I know we swallow > > InterruptedException in many tests, but does it make sense to set > > keepRunning = false if the GcInducingThread is interrupted? > > > > jtreg will use Thread.interrupt when trying to "cleanup" after the test > > has exited. I know in regular execution this should never happen, I'm > > just thinking about the case where some other bug is lurking, and also > > what is the general practice to handling InterruptedException in these > > tests? I really don't like that we ignore it when jtreg uses it for cleanup. > > > > -Chris. > > Hi Chris, > Thanks for your feedback. > > You make a good point regarding InterruptedException, particularly as > this test will hang on "failure" (ie. if the problem it's testing for > still exists), so would likely exercise this jtreg "cleanup". > > (I'm assuming that the cleanup occurs only if a test hasn't finished > within some specified time limit). > > Can you tell me, when jtreg decides to fire an interrupt at a test, has > it already concluded that the test has "failed" (or, at least, not > "passed") ? > > If it has reached this conclusion, then I think the change you suggest > will be sufficient. > > Otherwise, I'll also need to record that the GC'ing thread was > interrupted, so that the main thread can check this and an exception to > ensure it can't be misinterpreted as "passing". >
Or, perhaps, convert the InterruptedException to a RuntimeException thrown up and out of the GC'ing thread's run() method. > Advice on this point gratefully received. > > Thanks, Neil > -- Unless stated above: IBM email: neil_richards at uk.ibm.com IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU