mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
authority: register the lost-range fault hook cleanup before the assertion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
093fbc26f8
commit
ab0a8c783e
1 file changed
+1
@@ -26,6 +26,7 @@ func TestWorkspaceUncertainIssueWriteIsTyped(t *testing.T) {
|
||||
}
|
||||
*now = barrier.Add(time.Second)
|
||||
testLostRangeFaultHook = func(string) error { return errInjected }
|
||||
t.Cleanup(func() { testLostRangeFaultHook = nil })
|
||||
if _, err := p.MoveWorkspace(ctx, req, forcedLostRangeHead); !errors.Is(err, errInjected) || errors.Is(err, ErrWorkspaceOutcomeUncertain) {
|
||||
t.Fatalf("lost-range write failure before the issue: %v; want a plain refusal", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user