-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KGP - Fix flaky tests invoking javac through JDK APIs
Tests invoking javac APIs were flaky because ClasspathAnalyzerTest was using Gradle's ProjectBuilder, which appends tools.jar to the system class loader. Other tests do not do that, and they invoke javac APIs directly. In some executions, this causes some javac classes to be loaded from the system class loader (the one patched by Gradle), while some of them will be loaded by UrlClassLoader which points to tools.jar in java.home. Having javac classes from different class loaders causes java.lang.IllegalAccessError as package private access across class loaders is not allowed. https://bugs.openjdk.java.net/browse/JDK-8068152 has more information on this issue. This change fixes the issue by fully removing usage of ProjectBuilder. Test: ClasspathAnalyzerTest
- Loading branch information
Showing
2 changed files
with
8 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters