Skip to content

Commit

Permalink
retry assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jun 27, 2023
1 parent 2da9a0d commit 7255d9d
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,17 @@ class CassandraProjectionSpec
sourceProbe.get.sendNext(Envelope(entityId, n, s"elem-$n"))
}
offsetShouldBe(projectionId, 10L)
repository.findById(entityId).futureValue.get.text should include("elem-15")
eventually {
repository.findById(entityId).futureValue.get.text should include("elem-15")
}

(16 to 22).foreach { n =>
sourceProbe.get.sendNext(Envelope(entityId, n, s"elem-$n"))
}
offsetShouldBe(projectionId, 20L)
repository.findById(entityId).futureValue.get.text should include("elem-22")
eventually {
repository.findById(entityId).futureValue.get.text should include("elem-22")
}
}
}

Expand Down Expand Up @@ -404,13 +408,17 @@ class CassandraProjectionSpec
sourceProbe.get.sendNext(Envelope(entityId, n, s"elem-$n"))
}
offsetShouldBe(projectionId, 10L)
repository.findById(entityId).futureValue.get.text should include("elem-15")
eventually {
repository.findById(entityId).futureValue.get.text should include("elem-15")
}

(16 to 17).foreach { n =>
sourceProbe.get.sendNext(Envelope(entityId, n, s"elem-$n"))
}
offsetShouldBe(projectionId, 17L)
repository.findById(entityId).futureValue.get.text should include("elem-17")
eventually {
repository.findById(entityId).futureValue.get.text should include("elem-17")
}

}
}
Expand Down

0 comments on commit 7255d9d

Please sign in to comment.