-
Notifications
You must be signed in to change notification settings - Fork 137
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
Run tests fail #561
Comments
@rdcoe Would you mind to share a sample project which can reproduce this issue to us? |
This code resides in a private repo. I can share it with you if you can get me your public key. It's a super simple test, though:
The underlying code doesn't invoke anything, so I'm guessing that sharing the code won't help. If anything, the problem must be related to a hidden file that code uses. I've looked for logs but can't find any. Perhaps you can point me in the right direction and I can see what the underlying stacktrace looks like? |
Hmm, may I ask what do you mean by the 'hidden file'? Could you see any output in the Test Runner's output channel? |
For hidden files, I'm referring to things like .classpath, .project, .factorypath, etc. In fact, one or more of those files must have been corrupt. I have a maven multi-module source tree and I went through all my projects and deleted this hidden files as well as the bin/ directories. Now when I use the test runner it works. I also now have a working PROBLEMS tab. Before I deleted those hidden files, I would see PROBLEMS but if I clicked on anything, I would see an error telling me that the is actually a directory. Sorry, can't really explain better than that. In any case, Code recreated what it needed after I manually deleted everything and then ran a Maven update (Shift-Alt-U) on all my modules. I think that creates the .factorypath file? So, long story short, seems to now be working, so this bug can be closed. Workaround is to delete hidden files. I took a guess as to those I needed to delete but perhaps they are already documented somewhere? Not sure if that's true, as every extension might do its own thing and I saw no details about generated files as a side effect of any of the extensions I use. |
Glad to know the problem has been solved. Those files (.classpath, .project, ...) are generated by the Java Language Server, just as you said, by some unknown reason, these files might be corrupted. Since Test Runner depends on the Java Language Server, thus it cannot work properly if something wrong happens at the Java Language Server side. The workaround is just what you have done: remove them and let the Language Server regenerate them. |
Ran into the same issue. I'm not using Maven, so I can't delete Logs from "Language support for Java":
|
From @rdcoe in #470 (comment):
I have run into this error on one laptop but not another. Different code bases, so it may be project related, however I can successfully run the test goal using maven externally, so it's not a classpath problem. I have also confirmed that my .classpath test setup has the "test" attribute set to "true"
But when I run a test from the test explorer or from the test itself using the Run lens, an error dialog at pops up:
The text was updated successfully, but these errors were encountered: