RFR: 8367279: Test tools/javac/tree/TreePosTest.java timed out
Francesco Andreuzzi
fandreuzzi at openjdk.org
Wed Sep 17 08:31:57 UTC 2025
On Wed, 17 Sep 2025 08:20:09 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> The `test/langtools/tools/javac/tree/TreePosTest.java` tries to parse all langtools tests, and started to time out recently in some cases. In the case of this test, we can try to use the `JavacTaskPool`, which pools and reuses javac instances, rather than creating (and initializing) a javac instance for each file. Given this test only parses the file, and even attributes them, this should be relatively safe.
>
> Locally, I can't confirm too significant time improvements (before this change ~6s, after this change ~4s), but it might help on CI.
test/langtools/tools/javac/tree/TreePosTest.java line 290:
> 288: if (r.errors > 0)
> 289: throw new ParseException(sw.toString());
> 290: Iterator<? extends CompilationUnitTree> iter = trees.iterator();
Maybe `var` here would make the logic a bit more explicit?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27334#discussion_r2354737594
More information about the compiler-dev
mailing list