8195077: [Testbug] tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - AccessDeniedException
authorjlahoda
Fri, 22 Jun 2018 11:26:55 +0200
changeset 50712 df7094f72869
parent 50711 6f63d6886006
child 50713 9894c4d30168
8195077: [Testbug] tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - AccessDeniedException Summary: Use a new working directory for each sub-test. Reviewed-by: vromero
test/langtools/tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java
--- 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()));