-
Notifications
You must be signed in to change notification settings - Fork 123
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
Test runners interfere with Java language server #260
Comments
the extension would observe the
|
This occurs a lot for me and a colleague, several times a day if we're lucky and several times an hour if we're unlucky. Here is a capture of the stack trace of a thread when the Java Language Server stops responding:
The error occurs both with the Oracle distribution for Java 8 and the OpenJDK one for Java 9. |
Confirming this happens every after a few minutes of use. Disabling the extension seems to make the issue go away. |
Thanks for the info, @aholstenson @julianosam . We'll look into it this release. When did you start to meet this issue? I just want to make sure it is not a regression or something. |
@ansyral It's hard to say for sure. But I can tell I started getting these errors about 6-8 weeks ago. Likely after the 0.7.0 release on 06/26? |
Another thing I noticed is that, since I am using lombok in almost all of my Java projects, it seems to be easier to reproduce the issue when adding Lombok annotations to my classes. Maybe it's a coincidence, but I thought it would be worth mentioning. |
One finding is that Test Explorer would be refreshed as soon as test storage is updated. So if you are editing a test file and you have a project with many tests, then it would take a long time. To solve this, I plan to add incremental refresh feature for test explorer. @julianosam @aholstenson is this the scenario where you're stuck while editing java files? |
I never seen this happening while editing a test file, only source code (inside main folder). It happens much more frequently if I add/modify lombok annotations in the classes. What could this be impacting? Also, I work both on a Macbook and a Linux laptop. It happens much more frequently in the Mac. Only saw it a few times on my Linux pc. Could this be related to filesystem i/o maybe? |
@julianosam I see, for this case we'd better to add a check whether a file is test file before updating codelens. Thanks again for your prompt response. |
Hi @julianosam, I'm trying to investigate this issue on my side but currently having no luck to reproduce it. May I ask if it is possible for you to provide a sample project that can reproduce this issue on your side? Thanks, |
@jdneo Yes. I put together a Spring Boot project for us. I added some instructions how to reproduce in the source file itself. The issue seems to require a combination of Lombok annotations added to a class and the right timing when saving changes to the source file. If the change is saved while the validations are still running, the code completion and validation stops working completely, and can only be fixed by restarting VSCode. Let me know your findings! |
@julianosam Thank you for the information. I'll look into it! |
Wait for this to release: redhat-developer/vscode-java#637 (review) |
redhat-developer/vscode-java#592 One user is reporting that LS stops running occasionally. The issue was mitigated by disabling Java Test Runner.
Java Test Runner should not interfere with Language Server and stops it from working properly.
The text was updated successfully, but these errors were encountered: