Need reviewer for a few test updates
Kelly O'Hair
Kelly.Ohair at Sun.COM
Sat Oct 17 14:47:30 PDT 2009
They look fine to me. But I suspect a nio person should review it. ;^)
-kto
Alan Bateman wrote:
> I need a reviewer for two test bugs that have been bugging Kelly.
>
> 6892710 is tracking two tests that fail when run in jtreg samevm mode.
> Neither test can run in this mode and need the @run tag to force the run
> to be in othervm mode. The CheckPermissions test fails because it needs
> to set a security manager. ContentType fails because the
> FileTypeDetector used by the test can't be located. The changes are
> trivial:
>
> --- a/test/java/nio/file/Files/ContentType.java Thu Oct 15 22:47:56 2009
> -0700
> +++ b/test/java/nio/file/Files/ContentType.java Sat Oct 17 22:15:04 2009
> +0100
> @@ -26,7 +26,7 @@
> * @summary Unit test for probeContentType method
> * @library ..
> * @build ContentType SimpleFileTypeDetector
> - * @run main ContentType
> + * @run main/othervm ContentType
> */
>
> import java.nio.file.*;
> diff -r 368bb282464a test/java/nio/file/Path/CheckPermissions.java
> --- a/test/java/nio/file/Path/CheckPermissions.java Thu Oct 15
> 22:47:56 2009 -0700
> +++ b/test/java/nio/file/Path/CheckPermissions.java Sat Oct 17
> 22:15:04 2009 +0100
> @@ -25,6 +25,8 @@
> * @bug 6866804
> * @summary Unit test for java.nio.file.Path
> * @library ..
> + * @build CheckPermissions
> + * @run main/othervm CheckPermissions
> */
>
> 6892711 is that test/java/nio/file/Path/CopyAndMove.java is failing on
> JPRT windows-i586 clients. The failure only duplicates reliably on
> Windows 2000 and while that edition is ancient and unsupported it does
> highlight that the test doesn't take into account that the DOS archive
> attribute may be set automatically. The right thing is to simply remove
> the check from the test.
>
> diff -r 368bb282464a test/java/nio/file/Path/CopyAndMove.java
> --- a/test/java/nio/file/Path/CopyAndMove.java Thu Oct 15 22:47:56 2009
> -0700
> +++ b/test/java/nio/file/Path/CopyAndMove.java Sat Oct 17 22:15:04 2009
> +0100
> @@ -92,7 +92,6 @@ public class CopyAndMove {
> {
> assertTrue(attrs1.isReadOnly() == attrs2.isReadOnly());
> assertTrue(attrs1.isHidden() == attrs2.isHidden());
> - assertTrue(attrs1.isArchive() == attrs2.isArchive());
> assertTrue(attrs1.isSystem() == attrs2.isSystem());
> }
>
> Thanks,
>
> Alan.
>
>
>
More information about the nio-dev
mailing list