Intellij Idea hangs while running jUnit

已回答

Hi,

I have an issue with my intellij IDE. Currently i'm using v 2016.3.3 community edition but i had the same issue while i was using 14.1.7 enterprise edition.

When i try to run a jUnit the process hangs at the step of "Writing classes...[tests of <my_module>]". It stays like that for more than 1 hour. This is only happening after i change branches, for the first run of a jUnit on the branch. The issue persists even if i cancel the process and start it again or if i close intellij and open it again. The current solution is to wait until a run completes (after this, i can run jUnits instantly on the current branch) but waiting more than 1 hour is not that pleasant.

I have thread dump logs in the idea log folder where i can see blocked threads. If it helps, i could provide some.

My OS is Windows 7 but the issues reproduces for one of my colleagues on Ubuntu - for him, not as frequently as for me.

 

Thank you,
Mihai.

 

 

 

1
Avatar
Permanently deleted user

Changing the intellij compiler from javac to eclipse solved the issue

2

I'm having the same issue.  I'm launching unit tests with Gradle, and IntelliJ is now taking 60+ seconds to launch a unit test (it hangs on "Waiting for tests...") 

I'm not sure which thread is causing the launcher to hang.  I switched the compiler to Eclipse and am running the 64 bit version of IntelliJ with increased heap settings.  I'm not sure how to remedy this.

1

Make sure that antivirus/firewall software does not block IDE process and spawned by it processes. Disable it or exclude IDE settings/caches and project files from the scan.

Try using 2017.1 from https://confluence.jetbrains.com/display/IDEADEV/IDEA+2017.1+EAP and different Gradle version.

0

Same problem. I solved it by increasing the "Build process heap size" in the Settings (in  Build, Execution, Deployment > Compiler)

3

You saved my day Arnaud DENOYELLE

Andrey Dernov a clear error message would be helpful in such a case.

0

@Noc in case of a memory shortage I'm seeing this output when trying to run JUnit tests:

 

What behaviour do you observe? Is it a Gradle project? Thanks.

0

The behaviour occured while building the project when trying to start a SpringBoot application (via the main() method).

There were no log entries at all during the step "Writing classes..." of building the project. It simply didn't end.

So i was kinda in the dark and stumbled upon this thread by chance.

0

请先登录再写评论。