OpenJDK / amber / amber
changeset 57293:07e09cb9ed70
8227422: sun/net/www/protocol/file/DirPermissionDenied.java failed on Windows 2016 because DirPermissionDenied directory has no read permission
Reviewed-by: dfuchs
author | fyuan |
---|---|
date | Fri, 12 Jul 2019 13:59:22 +0800 |
parents | 7b11ce080798 |
children | a87f5fdcd177 |
files | test/jdk/sun/net/www/protocol/file/DirPermissionDenied.java |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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); } } -