diff --git a/build.sbt b/build.sbt index 6bd12044c7..b9e45d644b 100644 --- a/build.sbt +++ b/build.sbt @@ -28,11 +28,12 @@ import org.typelevel.scalacoptions.JavaMajorVersion.javaMajorVersion // To test release candidates, find the beam repo and add it as a resolver // ThisBuild / resolvers += "apache-beam-staging" at "https://repository.apache.org/content/repositories/" +ThisBuild / resolvers += "apache-beam-staging" at "https://repository.apache.org/content/repositories/orgapachebeam-1385/" val beamVendorVersion = "0.1" -val beamVersion = "2.58.1" +val beamVersion = "2.59.0" // check version used by beam -// https://github.com/apache/beam/blob/v2.58.1/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +// https://github.com/apache/beam/blob/v2.59.0-RC1/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy val autoServiceVersion = "1.0.1" val autoValueVersion = "1.9" val bigdataossVersion = "2.2.16" @@ -61,7 +62,7 @@ val googleApiServicesStorageVersion = s"v1-rev20240319-$googleClientsVersion" // beam tested versions val zetasketchVersion = "0.1.0" // sdks/java/extensions/zetasketch/build.gradle val avroVersion = avroCompilerVersion // sdks/java/extensions/avro/build.gradle -val flinkVersion = "1.18.0" // runners/flink/1.17/build.gradle +val flinkVersion = "1.18.0" // runners/flink/1.18/build.gradle val flinkMinorVersion = VersionNumber(flinkVersion).numbers.take(2).mkString(".") val hadoopVersion = "3.2.4" // sdks/java/io/parquet/build.gradle val sparkVersion = "3.5.0" // runners/spark/3/build.gradle diff --git a/scio-test/core/src/main/scala/com/spotify/scio/testing/SCollectionMatchers.scala b/scio-test/core/src/main/scala/com/spotify/scio/testing/SCollectionMatchers.scala index f7d2c91a22..2f825b408f 100644 --- a/scio-test/core/src/main/scala/com/spotify/scio/testing/SCollectionMatchers.scala +++ b/scio-test/core/src/main/scala/com/spotify/scio/testing/SCollectionMatchers.scala @@ -19,7 +19,6 @@ package com.spotify.scio.testing import java.lang.{Iterable => JIterable} import java.util.{Map => JMap} - import com.spotify.scio.coders.Coder import com.spotify.scio.values.SCollection import com.twitter.chill.Externalizer @@ -27,7 +26,7 @@ import org.apache.beam.sdk.testing.PAssert import org.apache.beam.sdk.testing.PAssert.{IterableAssert, SingletonAssert} import org.apache.beam.sdk.transforms.SerializableFunction import org.apache.beam.sdk.transforms.windowing.BoundedWindow -import org.apache.beam.sdk.util.CoderUtils +import org.apache.beam.sdk.util.{CoderUtils, SerializableSupplier} import org.scalatest.matchers.{MatchResult, Matcher} import org.{hamcrest => h} import org.hamcrest.Matchers @@ -69,13 +68,10 @@ private object ScioMatchers { /** Create a hamcrest matcher that can be serialized using a Coder[T]. */ private def supplierFromCoder[A: Coder, B](@transient a: A, @transient context: ScioContext)( builder: A => B - ) = { + ): SerializableSupplier[B] = { val coder = CoderMaterializer.beam(context, Coder[A]) val encoded = CoderUtils.encodeToByteArray(coder, a) - new SerializableMatchers.SerializableSupplier[B] { - def a = CoderUtils.decodeFromByteArray(coder, encoded) - def get() = builder(a) - } + () => builder(CoderUtils.decodeFromByteArray(coder, encoded)) } /**