Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellij 2024.2: Investigating unit test failure for 2024.2 intellij version #1048

Open
staicy123 opened this issue Oct 23, 2024 · 6 comments
Assignees
Milestone

Comments

@staicy123
Copy link

staicy123 commented Oct 23, 2024

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.
Logs:
log.txt

@staicy123 staicy123 self-assigned this Oct 23, 2024
@vaisakhkannan
Copy link
Contributor

Link to the Jetbrains Slack discussion : https://jetbrains-platform.slack.com/archives/C5U8BM1MK/p1729576853003949

@vaisakhkannan vaisakhkannan self-assigned this Oct 29, 2024
@vaisakhkannan
Copy link
Contributor

@staicy123 staicy123 moved this from New Issues to In Progress in Open Liberty Developer Experience Oct 30, 2024
@staicy123 staicy123 changed the title intellij 2024.2: Investigating unit test failure for 2024.2 intellij version intellij 2024.2: Investigating unit test failure for 2024.2 intellij version [Blocker] Oct 30, 2024
@staicy123 staicy123 changed the title intellij 2024.2: Investigating unit test failure for 2024.2 intellij version [Blocker] intellij 2024.2: Investigating unit test failure for 2024.2 intellij version Oct 30, 2024
@TrevCraw TrevCraw changed the title intellij 2024.2: Investigating unit test failure for 2024.2 intellij version Intellij 2024.2: Investigating unit test failure for 2024.2 intellij version Oct 30, 2024
@staicy123
Copy link
Author

staicy123 commented Nov 1, 2024

Hi @TrevCraw,

I would like to provide a detailed explanation of this issue. Based on the analysis, I found that the test fails when it reaches this method. Please find the relevant code and logs attached below.
Screenshot 2024-10-30 at 12 33 18 PM
Screenshot 2024-10-30 at 12 34 39 PM

Through discussions in the JetBrains Slack channel, it became clear that the issue is caused by a transitive dependency on kotlinx-coroutines. JetBrains provides a testFramework() dependency helper that might resolve this issue.

The testFramework(TestFrameworkType.Platform), testFramework(TestFrameworkType.Plugin.Maven), and similar configurations – when applied – add dependencies on the requested library version closest to your IntelliJ Platform version. They also exclude transitive dependencies already present in the IntelliJ Platform archive, including coroutines.

If you add a dependency on testFramework directly using testImplementation, it will include all transitive dependencies. Disabling transitive dependencies manually (using transitive = false) won’t work, as some dependencies are actually required. That’s why the testFramework helper exists.

I removed the manual Maven dependency for testFramework and implemented the suggested helper framework for Maven. However, kotlinx-coroutines is still appearing as a dependency in our project. When I reported this to the JetBrains team, they confirmed it’s a bug on their end and plan to address it in the next release. I’ve created an issue to track this.
https://youtrack.jetbrains.com/issue/IJSDK-2276/Even-after-adding-testFrameworktype-helper-could-still-see-coroutines-in-transitive-dependencies-hence-unit-test-failing

On further request, created issue in intellij-platform-gradle-plugin Github.
JetBrains/intellij-platform-gradle-plugin#1817

Please find the Slack conversation attached here: https://jetbrains-platform.slack.com/archives/C5U8BM1MK/p1730105939390899

They also confirmed that they will try to fix at the earliest

Thanks

@staicy123 staicy123 added this to the 24.0.12 milestone Nov 1, 2024
@staicy123 staicy123 moved this from In Progress to Parked in Open Liberty Developer Experience Nov 1, 2024
@staicy123
Copy link
Author

Hi @TrevCraw,

Update on the Issue:

As of today, we tested the snapshot version provided by the team on Friday evening. They attempted to fix the issue, but we confirmed that the problem still persists, and we are unable to run the unit tests using version 2024.2.

On their request, I shared the GitHub link where we are making changes to support version 2024.2 and am currently waiting for their reply.

Analysis:

From my findings, it appears that the kotlinx dependency has been removed in the new version. Our tests are still expecting this dependency to run successfully. I'm not entirely sure about this observation, but I would appreciate any contributions or insights from your end if you have any information on this matter.

Thanks

@TrevCraw
Copy link
Contributor

TrevCraw commented Nov 4, 2024

Hi @staicy123 , I don't have any more insight into this. I think we need to continue to communicate with the JetBrains team and see what new information we get from them.

@vaisakhkannan
Copy link
Contributor

vaisakhkannan commented Nov 6, 2024

Based on Jetbrains Replay

I see you have

platformBundledPlugins=com.intellij.java, org.jetbrains.idea.maven, com.intellij.gradle, org.jetbrains.plugins.terminal, com.intellij.properties

Currently, Intellij Gradle plugin 2.1.0 has an issue with loading all required bundled modules when targeting 2024.2

The final 2.2.0 will handle that properly (I’m still waiting for Plugin Verifier libraries to be fixed)

NOTE: So we need to wait for the version 2.2.0 and then need to test this unit test failure issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants