He-Pin opened a new pull request, #3013:
URL: https://github.com/apache/pekko/pull/3013

   ## Motivation
   
   `RemoveInternalClusterShardingDataSpec` *"must remove all events and 
snapshots"* is intermittently flaky (#1228), failing with `true did not equal 
false` at the post-removal `hasSnapshots`/`hasEvents` assertions.
   
   Even though `RemoveOnePersistenceId` has already replied with a successful 
`Removals` result, a fresh read of the snapshot/event store may not observe the 
deletion immediately, so the assertion can still see stale data.
   
   ## Modification
   
   Wrap the post-removal `hasSnapshots`/`hasEvents` assertions in `awaitAssert` 
so they retry until the deletion becomes visible — mirroring the `awaitAssert` 
already used for the pre-removal snapshot-visibility check a few lines above.
   
   ## Result
   
   The test tolerates the eventual visibility of deletions; it still passes 
locally.
   
   ```
   [info] - must remove all events and snapshots (133 milliseconds)
   [info] - must remove all events and snapshots (828 milliseconds)
   [info] Tests: succeeded 6, failed 0
   [info] All tests passed.
   ```
   
   ## Tests
   
   `cluster-sharding/testOnly 
org.apache.pekko.cluster.sharding.RemoveInternalClusterShardingDataSpec` — all 
6 pass. `scalafmt` run on the changed file. Test-only change.
   
   ## References
   
   Fixes #1228


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to