Hi guys,

I wanted to check if anyone has encountered the following problem and has some more insight or a solution, before I create a Groovy ticket:

In short, my code contains some simple @AnnotationCollector|ed interfaces, the simplest looking like:

import groovy.transform.AnnotationCollector
import groovy.transform.InheritConstructors

@AnnotationCollector([InheritConstructors])
public @interface Foo{}


Switching to JUnit 5 the following exception now blocks the execution of any pattern- or selective-based test suite in IntelliJ under Groovy 3.0.8 / OpenJDK11U-jdk_x64_windows_hotspot_11.0.9.1_1:

org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-vintage' failed to discover tests Caused by: java.lang.IncompatibleClassChangeError: Foo and Foo$CollectorHelper disagree on InnerClasses attribute

Some more info:

1. The exception is thrown during the test discovery phase, i.e. before
   any tests get executed.
2. The exception had already occured for some time in a specific test
   under JUnit 4, but it only failed that particular test, and the
   error disappeared when rerunning the test (so I never invested the
   time to investigate further).
3. I am not actually using junit-vintage, but earlier I had the same
   exception two times, one for junit and one for junit-vintage, so I
   do not assume it is actually tied to the junit-vintage, but that in
   this case IntelliJ or JUnit just hides the other exception or such.

Cheers,
mg

PS: I found this similar looking: ticket https://issues.apache.org/jira/browse/GROOVY-9405, which was fixed in 3.0.4 ...





Reply via email to