mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
15336d7485
commit
bce9b4f99e
1 file changed
+5
-3
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user