Skip to content

Commit

Permalink
Use 2.13 api in test
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Aug 9, 2024
1 parent ddddda4 commit f0acd2e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scio-core/src/test/scala/com/spotify/scio/coders/CoderTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import org.typelevel.scalaccompat.annotation.nowarn

import scala.collection.{mutable => mut}
import java.io.{ByteArrayInputStream, ObjectOutputStream, ObjectStreamClass}
import java.nio.charset.Charset
import java.time._
import java.util.UUID

import scala.collection.{mutable => mut}
import scala.collection.compat._
import scala.collection.immutable.SortedMap
import scala.jdk.CollectionConverters._

Expand Down Expand Up @@ -97,9 +99,7 @@ final class CoderTest extends AnyFlatSpec with Matchers {

val nil: Seq[String] = Nil
val s: Seq[String] = (1 to 10).map(_.toString)
val kvs = s.map(v => v -> v)
val m: Map[String, String] = kvs.toMap
val sm = SortedMap(kvs: _*)
val m: Map[String, String] = s.map(v => v -> v).toMap

nil coderShould roundtrip() and
beOfType[CoderTransform[_, _]] and
Expand All @@ -125,7 +125,7 @@ final class CoderTest extends AnyFlatSpec with Matchers {
materializeTo[MapCoder[_, _]] and
beFullyCompliantNonDeterministic()

sm coderShould roundtrip() and
SortedMap.from(m) coderShould roundtrip() and
beOfType[CoderTransform[_, _]] and
materializeTo[SortedMapCoder[_, _]] and
beFullyCompliant()
Expand All @@ -135,17 +135,17 @@ final class CoderTest extends AnyFlatSpec with Matchers {
materializeTo[SetCoder[_]] and
beFullyCompliantNonDeterministic()

mut.ListBuffer(1 to 10: _*) coderShould roundtrip() and
mut.ListBuffer.from(s) coderShould roundtrip() and
beOfType[Transform[_, _]] and
materializeToTransformOf[BufferCoder[_]] and
beFullyCompliant()

BitSet(1 to 100000: _*) coderShould roundtrip() and
BitSet.fromSpecific(1 to 100000) coderShould roundtrip() and
beOfType[Beam[_]] and
materializeTo[BitSetCoder] and
beFullyCompliant()

mut.Set(s: _*) coderShould roundtrip() and
mut.Set.from(s) coderShould roundtrip() and
beOfType[CoderTransform[_, _]] and
materializeTo[MutableSetCoder[_]] and
beFullyCompliant()
Expand Down

0 comments on commit f0acd2e

Please sign in to comment.