Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Harden test of RecoveryStrategy.skip #1086

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even though these tests are exacly-once the offset might not have been stored yet, we have only seen "e5"

}

"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