1
0
mirror of https://github.com/etcd-io/etcd.git synced 2026-02-05 06:46:49 +01:00
Files
etcd/cache/cache_test.go
HossamSaberX f7029fdb75 cache: deflake TestCacheCompactionResync
The test had a race condition where Phase 3 checked lastStartRev
before the cache finished updating it. The mw.registered channel
was already closed from Phase 1, so <-mw.registered returned
immediately instead of waiting.

Fix: Add resetRegistered() to create a fresh channel for Phase 3,
ensuring the test properly waits for the cache to complete recovery.

Fixes #21150

Signed-off-by: HossamSaberX <hossam.sabeer55@gmail.com>
2026-01-18 05:57:40 +02:00

19 KiB