Skip to content

Commit

Permalink
test: Harden test of RecoveryStrategy.skip
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Dec 6, 2023
1 parent 9cddb36 commit db97ac8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ class JdbcProjectionSpec
projectionTestKit.run(projectionFailing) {
projectedValueShouldBe("e1|e2|e3|e4|e5")
}
offsetShouldBe(6L)
eventually {
offsetShouldBe(6L)
}
}

"skip failing events after retrying when using RecoveryStrategy.retryAndSkip" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ class R2dbcProjectionSpec
projectionTestKit.run(projectionFailing) {
projectedValueShouldBe("e1|e2|e3|e4|e5")
}
offsetShouldBe(6L)
eventually {
offsetShouldBe(6L)
}
}

"skip failing events after retrying when using RecoveryStrategy.retryAndSkip" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ class R2dbcTimestampOffsetProjectionSpec
projectionTestKit.run(projectionFailing) {
projectedValueShouldBe("e1|e2|e3|e4|e5")
}
offsetShouldBe(envelopes.last.offset)
eventually {
offsetShouldBe(envelopes.last.offset)
}
}

"skip failing events after retrying when using RecoveryStrategy.retryAndSkip" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,10 @@ class SlickProjectionSpec
}
}
withClue("check - all offsets were seen") {
val offset = offsetStore.readOffset[Long](projectionId).futureValue.value
offset shouldBe 6L
eventually {
val offset = offsetStore.readOffset[Long](projectionId).futureValue.value
offset shouldBe 6L
}
}
}

Expand Down

0 comments on commit db97ac8

Please sign in to comment.