After making changes in build.gradle file for supporting intellij 2024.2. When running the unit test for intellij 2024.2. The build is neither getting failed nor terminated for a long time. The termination takes more than 10 minutes. The same tests works fine for intellij 2024.1 version.
This is our build.gradle file.
This is our issue number 1048 opened in our repo Liberty Tools Intellij. You can obtain the build failure logs from the issue description. The logs are collected after the tests have been terminated.
Upon investigation we found that the test fails when it reaches this method
The failure pointed to above specific line of code located in the BaseJakartaTest
class, which extends the MavenImportingTestCase class. The line invokes the method importProjectsAsync(pomFiles.toArray(VirtualFile[]::new), continuation)
, which is defined in the MavenImportingTestCase
class.
As I shared the screenshot below, there are two additional parameters present in the code built using version 2024.2
compared to the code built using version 2024.1
. We are calling importProjectsAsync
method in BaseJakartaTest` class which is responsible for running the unit tests.
With the modification of importProjectsAsync
in 2024.2, which now includes SimpleStructureProjectVisitor()
, we are encountering a deadlock when invoking this function from Java using BuildersKt.runBlocking.
We assume , the issue appears to have originated from IntelliJ’s side, likely due to changes in indexing behavior after the modification that introduced SimpleStructureProjectVisitor()
. The deadlock occurs when calling importProjectsAsync
from Java using BuildersKt.runBlocking
, as the function waits on IndexingTestUtil.suspendUntilIndexesAreReady
, which in turn requires coroutine
execution but gets blocked. This was not an issue before the IntelliJ modification, suggesting that recent indexing changes may have affected coroutine execution.
We currently using below versions
plugins {
id 'java'
id 'org.jetbrains.intellij.platform' version '2.2.1'
id 'org.jetbrains.kotlin.jvm' version '2.1.10'
}