Abacn commented on code in PR #32183:
URL: https://github.com/apache/beam/pull/32183#discussion_r1717455854


##########
sdks/java/testing/test-utils/build.gradle:
##########
@@ -40,15 +40,15 @@ dependencies {
   provided library.java.jmh_core
 
   testImplementation library.java.junit
-  testRuntimeOnly project(path: ":runners:direct-java", configuration: 
"shadowTest")
+  testRuntimeOnly project(path: ":runners:direct-java", configuration: 
"shadow")

Review Comment:
   shadowTest currently does not work on Java21 tests because shadow plugin 
does not support Java21:
   
   ```
   org.gradle.api.GradleException: Could not add file 
'/Users/yathu/beam/sdks/java/core/build/classes/java/test/DefaultPackageTest$MyFn.class'
 to ZIP 
'/Users/yathu/beam/sdks/java/core/build/libs/beam-sdks-java-core-2.59.0-SNAPSHOT-tests.jar'.
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
           at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 65
           at shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
           at shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
           at shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
           at shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:287)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
           at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
           at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
           at 
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
   ```
   
   here "shadow" configuration is sufficient (like other tests runs pipeline on 
direct runner)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to