Switch headless tests to radler#8367
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates Bazel module dependencies, adds test-framework-team-city.jar to the CLion 261 SDK, and switches the suppressed plugin set from classic to radler in CLion test definitions. It also refactors ClwbHeadlessTestCase to resolve and symlink both bin and lib sandbox directories prior to application startup. Feedback on these changes highlights a critical issue in linkSandboxDir where local test execution could lead to the accidental deletion of SDK files if the symlink and target paths are identical; adding a path equality check is recommended to prevent this.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| private static void linkSandboxDir(Path sdkRoot, String dirName, Path link) { | ||
| final var target = sdkRoot.resolve(dirName); | ||
| assertExists(target.toFile()); | ||
|
|
||
| try { | ||
| final var link = Path.of(PathManager.getBinPath()); | ||
| Files.deleteIfExists(link); | ||
| Files.createSymbolicLink(link, sdkBinPath); | ||
| Files.createSymbolicLink(link, target); | ||
| } catch (IOException e) { | ||
| abort("could not create bin path symlink", e); | ||
| abort("could not create " + dirName + " path symlink", e); | ||
| } | ||
| } |
There was a problem hiding this comment.
If link and target point to the same path (for example, when running tests locally where idea.home.path points directly to the SDK), calling Files.deleteIfExists(link) will attempt to delete the actual SDK directory, which will fail or delete SDK files. We should add a guard to return early if link and target are the same path.
private static void linkSandboxDir(Path sdkRoot, String dirName, Path link) {
final var target = sdkRoot.resolve(dirName);
assertExists(target.toFile());
if (link.toAbsolutePath().equals(target.toAbsolutePath())) {
return;
}
try {
Files.deleteIfExists(link);
Files.createSymbolicLink(link, target);
} catch (IOException e) {
abort("could not create " + dirName + " path symlink", e);
}
}0402c4a to
1d0399f
Compare
# Conflicts: # MODULE.bazel.lock
1d0399f to
69b9f9d
Compare
# Conflicts: # clwb/tests/headlesstests/com/google/idea/blaze/clwb/LibCppTest.java
69b9f9d to
837accd
Compare
Since classic is going to be unbundled with 262 the dependency on classic has to be removed and headless tests need to run with radler. Furthermore, this allows us to finally write gutter icon tests down the line.