mosche commented on code in PR #25216:
URL: https://github.com/apache/beam/pull/25216#discussion_r1142410153


##########
sdks/java/extensions/avro/build.gradle:
##########
@@ -53,4 +64,41 @@ dependencies {
   testImplementation library.java.junit
   testRuntimeOnly project(path: ":runners:direct-java", configuration: 
"shadow")
   testRuntimeOnly library.java.slf4j_jdk14
-}
\ No newline at end of file
+  avroVersions.each {"avroVersion$it.key" "org.apache.avro:avro:$it.value"}
+}
+
+avroVersions.each { kv ->
+  configurations."avroVersion$kv.key" {
+    resolutionStrategy {
+      force "org.apache.avro:avro:$kv.value"
+    }
+  }
+}
+
+avroVersions.each {kv ->
+  task "avroVersion${kv.key}Test"(type: Test) {
+    group = "Verification"
+    description = "Runs Avro extension tests with Avro API $kv.value"
+    outputs.upToDateWhen { false }
+    testClassesDirs = sourceSets.test.output.classesDirs
+    classpath =  configurations."avroVersion${kv.key}" + 
sourceSets.test.runtimeClasspath
+    include '**/*.class'
+    exclude '**/AvroIOTest$NeedsRunnerTests$*.class'
+    if (!kv.value.equals("1.8.2")) {

Review Comment:
   @aromanenko-dev Are you sure this is due to AVRO-2943? If I run this, tests 
are failing with
   ```
   java.lang.ClassCastException: Cannot cast org.joda.time.LocalDate to 
java.time.LocalDate
   ```
   
   Imho, excluding this test would just hide various potential issues with more 
recent Avro versions. The map equals bug in AVRO-2943 seems to be just one of 
many. It would be good to separate these into various test cases that then 
serve as a documentation.



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