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


##########
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")
 }
 
-['8', '11', '17', '21'].each {
-  tasks.create(name: "verifyJavaVersion${it}", type: Test) {
+['8', '11', '17', '21'].each { String ver ->
+  tasks.create(name: "verifyJavaVersion${ver}", type: Test) {

Review Comment:
   Groovy has a many implicit and errorprone syntax and this is one of it. 
Foreach closure has an implicit variable that has default name `it`. However, 
the tasks.create closure override the same name, causing "${it}" resolved to 
"Task " and as a result, only verifyCodeIsCompiledWithJava8 was run



-- 
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