6993267: TEST_BUG: java/nio/file/Path/InterruptCopy.java fails intermittently (win)

Rémi Forax forax at univ-mlv.fr
Thu Oct 21 05:37:21 PDT 2010


Le 21/10/2010 14:00, Alan Bateman a écrit :
>
> This test exercises copyTo with an implementation specific option that 
> allows the copy to be interrupted. It fails intermittently on some of 
> our faster Windows machines because the copy completes before it can 
> be interrupted. The follow webrev fixes the test to make it more 
> robust and handle the case where the copy completes quickly.
>  http://cr.openjdk.java.net/~alanb/6993267/webrev/
>
> Thanks,
> Alan.

Hi Alan,
if wakeup task is interrupted, you should throw an assertion error,
it should never happen.

so line 102 should be

} catch (InterruptedException e) {
   throw (AssertionError)new Assertionerror().initCause(e);
}


Otherwise, it's Ok.

Rémi





More information about the nio-dev mailing list