8195077: [Testbug] tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - AccessDeniedException
Summary: Use a new working directory for each sub-test.
Reviewed-by: vromero
--- a/test/langtools/tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java Wed Jun 20 14:25:45 2018 +0200
+++ b/test/langtools/tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java Fri Jun 22 11:26:55 2018 +0200
@@ -135,15 +135,13 @@
permutations(files, Collections.emptyList(), result);
+ int testNum = 0;
+
for (List<Path> order : result) {
for (Path missing : order) {
- Path test = base.resolve("test");
+ Path test = base.resolve(String.valueOf(testNum++)).resolve("test");
- if (Files.exists(test)) {
- tb.cleanDirectory(test);
- } else {
- tb.createDirectories(test);
- }
+ tb.createDirectories(test);
for (Path p : order) {
Files.copy(p, test.resolve(p.getFileName()));