Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Sep 5, 2024
1 parent 0f1c711 commit 75af6ed
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package com.spotify.scio.testing
import com.spotify.scio.coders.{Coder, CoderMaterializer}
import com.spotify.scio.streaming.ACCUMULATING_FIRED_PANES
import com.spotify.scio.values.WindowOptions
import org.apache.beam.sdk.Pipeline.PipelineExecutionException
import org.apache.beam.sdk.transforms.windowing.{
AfterProcessingTime,
AfterWatermark,
Expand Down Expand Up @@ -130,10 +129,10 @@ class SCollectionMatchersTest extends PipelineSpec {
an[AssertionError] should be thrownBy {
runWithContext(_.parallelize(Seq(1)) should containSingleValue(10))
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext(_.parallelize(1 to 10) should containSingleValue(1))
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(Seq.empty[Int]) should containSingleValue(1)
}
Expand All @@ -145,10 +144,10 @@ class SCollectionMatchersTest extends PipelineSpec {
an[AssertionError] should be thrownBy {
runWithContext(_.parallelize(Seq(1)) shouldNot containSingleValue(1))
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext(_.parallelize(1 to 10) shouldNot containSingleValue(1))
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(Seq.empty[Int]) shouldNot containSingleValue(1)
}
Expand Down Expand Up @@ -351,12 +350,12 @@ class SCollectionMatchersTest extends PipelineSpec {
_.parallelize(Seq(1)) should satisfySingleValue[Int](_ == 10)
}
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(1 to 10) should satisfySingleValue[Int](_ == 1)
}
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(Seq.empty[Int]) should satisfySingleValue[Int](_ == 1)
}
Expand All @@ -372,12 +371,12 @@ class SCollectionMatchersTest extends PipelineSpec {
_.parallelize(Seq(1)) shouldNot satisfySingleValue[Int](_ == 1)
}
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(1 to 10) shouldNot satisfySingleValue[Int](_ == 1)
}
}
a[PipelineExecutionException] should be thrownBy {
a[AssertionError] should be thrownBy {
runWithContext {
_.parallelize(Seq.empty[Int]) shouldNot satisfySingleValue[Int](_ == 1)
}
Expand Down

0 comments on commit 75af6ed

Please sign in to comment.