test(relay): cover member-cache invalidation routes and refill orders (#9748)

## Summary

Add 54 cases that verify a relay cache refill cannot restore stale
channel membership after invalidation. The cases cover stale grants and
denials, reader and community isolation, and three orders in which reads
can finish.

The publish-wrapper cases exercise the local cache drop. The receiving
handlers are tested separately. Both unit-test runners select the new
cases.

### Related issue

Test coverage for #9735 and #9742.

### Testing

The read-cache lane passed all 26 tests on the reviewed tree. Both
runners selected all three new tests. The draft will remain open while
repository CI and human confirmation are pending.

For manual verification, run `cargo test -p buzz-relay --lib
state::tests::member_channel_invalidation_tests:: -- --nocapture` and
expect three passes.

Generated with Codex

Signed-off-by: Brad Seiler <seiler@squareup.com>
This commit is contained in:
Brad Seiler
2026-11-20 10:31:32 -05:00
committed by GitHub
parent a79cbb4664
commit 786726907c
4 changed files with 241 additions and 65 deletions

View File

@@ -422,7 +422,6 @@ run_unit_tests() {
community_active::tests::invalidation_fences_an_in_flight_fill_and_its_waiters \
community_active::tests::errors_are_not_cached \
state::tests::concurrent_open_channel_misses_share_the_in_flight_read \
state::tests::a_member_read_that_straddles_an_invalidation_is_not_cached \
state::tests::a_member_snapshot_ages_from_its_read_not_its_insert \
state::tests::overlapping_member_reads_cache_the_first_to_finish \
state::tests::an_open_read_that_straddles_an_invalidation_is_not_cached \
@@ -431,6 +430,9 @@ run_unit_tests() {
tenant::tests::an_overlong_host_fails_closed_before_the_resolver \
state::tests::disconnect_drops_the_cached_restriction_row
run_test_step "buzz-relay member-channel invalidation route tests" \
cargo test -p buzz-relay --lib state::tests::member_channel_invalidation_tests:: -- --nocapture
run_test_step "buzz-relay membership snapshot tests" \
cargo test -p buzz-relay --lib membership_cache::tests:: -- --nocapture