updated tests are not compiling unless whole project is rebuilt
Answered
I have been facing some weird problem in my intellij setup - I have been using Intellij for many years but never faced this.
Project build tool - Gradle and auto-import is enabled.
I have also enabled Make project automatically.
Still not sure what is causing the issue - when I update the tests and rerun it, its not taking latest updates and takes older compiled tests. And I have to Rebuild entire project to compile the updates - which is quite annoying.
And this happens only on couple of projects. Please suggest what settings I need to change.
Version being used.

Thanks,
Kunal
Please sign in to leave a comment.
Do you have Build step enabled in the test run/debug configuration before launch steps?
Yes, Before launch I have enabled Make. But behavior is no different.
You may want to enable debug logging for build.log and check the log to see if the file you change inside IDE is updated on Build: https://intellij-support.jetbrains.com/hc/articles/207241085.
Does the .class file for this test change the timestamp after you modify the source and Build the project?
I have changed log level to debug and its I see lot of logs being dumped in build.log but not able to understand that.
However I see that timestamp of .class file is not getting changed as soon as change the test method. But when I compile the class explicitly from Build > Compile ***.java - timestamp is getting updated and updated test also works. How do I get rid of this problem ?
To understand the problem we'll need a reproducible test case.
Just noticed that your IDE version is too old, it could be some issue that was fixed long time ago. Did you try with the latest version from http://www.jetbrains.com/idea/download/index.html? Does it have the same problem?
Somehow I tried creating sampleproject to reproduce the issue but there it was reproduced on the same intellij version :(
Any module specific configuration/settings which I missed ?
There is no setting that would affect it, it looks like a bug.
See the related discussion which was caused by incorrect output directory configuration:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000110004-HotSwap-Loaded-classes-are-up-to-date-Nothing-to-reload-on-PC-not-on-laptop