Closed jansorg closed 9 months ago
@apotterri Any thoughts on this error?
@jansorg Can you add some details about how to reproduce this, please?
I was able to reproduce this by running the tests in appmap-intellij-plugin on Windows. Looks like it's a problem with one of the Junit4 hooks.
Are we using JUnit 4, or is IntelliJ using JUnit 4?
IntelliJ is using JUnit4 and is only very slowly migrating to JUnit 5. AFAIK running with the JUnit5 engine is not possible.
I'm still going to investigate this, once I get back to working on JUnit support.
I wonder, though, @jansorg... have you actually tried to run the tests using the Vintage engine? I did, and it was able to properly discover and run at least some of them. Do you know of problems I just haven't hit yet?
I didn't mention the JUnit 5 Vintage engine. By default, JUnit4 is used to run the tests and in my experience it's often a waste of time to attempt to force software into an environment it wasn't engineered for. Until today there was no reason to attempt to run with JUnit 5 Vintage. https://github.com/getappmap/appmap-intellij-plugin/pull/481 is a quick PR to enable the JUnit 5 Vintage engine for our tests. Windows tests are still failing, but apparently with a different error in the agent ("there's no active recording session" and "a recording session already exists")
Agree about not wasting effort trying to use software in an environment it wasn't engineered for. But, in this case, the Vintage engine was designed for exactly this use case.
Thanks for that PR. We can incorporate it once the JUnit work in the agent is done.
Turns out I was able to restore support for recording JUnit 4 tests, so now both JUnit 4 and 5 are supported.
@jansorg, it's up to you whether you want to use the Vintage engine going forward. If you do, you can mark #481 as ready-for-review and add me as a reviewer for it. If you don't, you can close it, and this issue as well.
This is still an issue. This error happens when one of the plugin tests fails, and the agent tries to capture the failure.
:tada: This issue has been resolved in version 1.26.1 :tada:
The release is available on:
v1.26.1
Your semantic-release bot :package::rocket:
I noticed this exception of the Java agent when I executed tests of the AppMap JetBrains plugin. The test failed.