Skip to content

Fix sensitivity of integration tests to message arrival order

akwizgran requested to merge fix-test-sensitivity-to-arrival-order into master

Some integration tests that sync messages with dependency relationships (e.g. a blog post and a comment) fail intermittently. This happens because the integration tests count the number of messages that enter the invalid, pending or delivered state on the receiver. When a valid message arrives before its dependency, it's counted twice (pending then delivered), whereas when it arrives after its dependency it's counted once (delivered). If the message has the same timestamp as its dependency (which happens intermittently) then either arrival order is possible, because messages are selected for transmission in timestamp order.

This branch solves the issue by using separate counters for the delivered state and the invalid/pending states, so when we're interested in the number of deliveries we only count deliveries.

Merge request reports