fix: close leaked replica in TestShip_DegradedDoesNotSilently

The test used createSyncAllPair(t) but discarded the replica
return value, leaving the volume file open. On Windows this
caused TempDir cleanup failure. All 7 CP13-1 baseline FAILs
now PASS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
pingqiu
2026-03-26 16:54:05 -07:00
co-authored by Claude Opus 4.6
parent 3e9358f2be
commit 4ed54d04ba
@@ -462,8 +462,9 @@ func TestWalRetention_RequiredReplicaBlocksReclaim(t *testing.T) {
// This is acceptable for best_effort but problematic for sync_all because
// the primary loses track of the replica gap size.
func TestShip_DegradedDoesNotSilentlyCountAsHealthy(t *testing.T) {
primary, _ := createSyncAllPair(t)
primary, replica := createSyncAllPair(t)
defer primary.Close()
defer replica.Close()
// Point shipper at dead address — will degrade on first Ship.
primary.SetReplicaAddr("127.0.0.1:1", "127.0.0.1:2")