gradle / test-retry-gradle-plugin

Gradle plugin to retry tests that have failed to mitigate test flakiness.
Apache License 2.0
220 stars 49 forks source link

Gracefully fallback when incompatible classes found #226

Closed DanielThomas closed 9 months ago

DanielThomas commented 10 months ago

We do quite a bit of early access build evaluation, and this breaks when running on JDK 22:

12:58:32 MutationDataFetcherTest > removeTitleProtection_whenVideoIdNotProvided(String) > [2] videoId=null PASSED
12:58:32 Unsupported class file major version 66
12:58:32 java.lang.IllegalArgumentException: Unsupported class file major version 66
12:58:32    at com.gradle.scan.plugin.internal.dep.org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(SourceFile:199)
12:58:32    at com.gradle.scan.plugin.internal.dep.org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(SourceFile:180)
12:58:32    at com.gradle.scan.plugin.internal.dep.org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(SourceFile:166)
12:58:32    at com.gradle.scan.plugin.internal.dep.org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(SourceFile:287)
12:58:32    at com.gradle.scan.plugin.internal.dep.org.gradle.testretry.internal.testsreader.TestsReader.visit(SourceFile:72)

Disabling retires would be fine in this situtation. Spring Core has a version of ASM that patches our the experimental flags, so can be a version or two ahead, so using that is also an option.