From bce9b4f99e77277f1faae35db29f3f2da46c4478 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Fri, 20 Nov 2026 07:04:32 -0800 Subject: [PATCH] test(master): the revocation ACK test no longer races a 1 s bound The ACK in TestWorkspaceBindingRemoteReadDoesNotBlockAck ran under a fixed 1 s deadline that also covered a durable persist, so a loaded host could fail it with nothing blocked. It now runs under the test's own context: the held remote call is released only after the ACK returns, so an ACK that waited for it still fails at that deadline. Refs #300 Co-Authored-By: Claude Opus 5.5 --- .../core/host/master/workspace_binding_review_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/seaweed-block/core/host/master/workspace_binding_review_test.go b/seaweed-block/core/host/master/workspace_binding_review_test.go index 7a1fabe73e..a05b189517 100644 --- a/seaweed-block/core/host/master/workspace_binding_review_test.go +++ b/seaweed-block/core/host/master/workspace_binding_review_test.go @@ -282,9 +282,11 @@ func TestWorkspaceBindingRemoteReadDoesNotBlockAck(t *testing.T) { case <-ctx.Done(): t.Fatal("remote call not reached", ctx.Err()) } - ackCtx, cancel := context.WithTimeout(ctx, time.Second) - _, e := client.AckWorkspaceRevoked(ackCtx, &control.WorkspaceRevocationAck{Identity: id, HeadGen: 9}) - cancel() + // The held remote call is released only after the ACK returns, so an + // ACK that waited for it would run into the test's own deadline. No + // separate 1 s bound: the ACK includes a durable persist, which a + // loaded host can slow past that without anything being blocked. + _, e := client.AckWorkspaceRevoked(ctx, &control.WorkspaceRevocationAck{Identity: id, HeadGen: 9}) close(release) select { case <-done: