# HG changeset patch # User fyuan # Date 1562911162 -28800 # Node ID 07e09cb9ed70232fee382c98de4c4d1656fe0538 # Parent 7b11ce080798dc8ba22805e6d812a0efb7ca6958 8227422: sun/net/www/protocol/file/DirPermissionDenied.java failed on Windows 2016 because DirPermissionDenied directory has no read permission Reviewed-by: dfuchs diff -r 7b11ce080798 -r 07e09cb9ed70 test/jdk/sun/net/www/protocol/file/DirPermissionDenied.java --- a/test/jdk/sun/net/www/protocol/file/DirPermissionDenied.java Fri Jul 12 09:27:00 2019 +0530 +++ b/test/jdk/sun/net/www/protocol/file/DirPermissionDenied.java Fri Jul 12 13:59:22 2019 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -90,8 +90,12 @@ } @AfterTest - public void tearDown() throws IOException { + public void tearDown() throws Throwable { + // add read permission to ensure the dir removable + ProcessTools.executeCommand("chmod", "733", TEST_DIR.toString()) + .outputTo(System.out) + .errorTo(System.out) + .shouldHaveExitValue(0); FileUtils.deleteFileIfExistsWithRetry(TEST_DIR); } } -