changeset 51346:df7094f72869

8195077: [Testbug] tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - AccessDeniedException Summary: Use a new working directory for each sub-test. Reviewed-by: vromero
author jlahoda
date Fri, 22 Jun 2018 11:26:55 +0200
parents 6f63d6886006
children 9894c4d30168
files test/langtools/tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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()));