diff --git a/seaweed-block/core/frontend/durable/provider_startup_outcome_test.go b/seaweed-block/core/frontend/durable/provider_startup_outcome_test.go index fe93654ab8..d275dc76b0 100644 --- a/seaweed-block/core/frontend/durable/provider_startup_outcome_test.go +++ b/seaweed-block/core/frontend/durable/provider_startup_outcome_test.go @@ -109,8 +109,10 @@ func TestChunkStartupSealedAssignmentStaysForReplay(t *testing.T) { } } -// The attach check returns a retained disposition only AFTER its context's -// deadline. This makes the timeout-defer boundary causal, not a scheduler race. +// The attach check returns a retained disposition only AFTER the assignment +// allowance and a bounded object call expire. The assignment allowance itself +// no longer cancels growing attach work; a failed object call still must not +// replace a retained disposition with a process retry. func TestChunkStartupRetainedDispositionWinsExpiredAttachContext(t *testing.T) { for _, tc := range []struct { name string @@ -134,7 +136,9 @@ func TestChunkStartupRetainedDispositionWinsExpiredAttachContext(t *testing.T) { ChunkAssignmentTimeout: 250 * time.Millisecond, ChunkAttachCheck: func(ctx context.Context, _ string, _ durable.ChunkGeometry) error { entered.Store(true) - <-ctx.Done() + object, cancel := context.WithTimeout(ctx, 300*time.Millisecond) + defer cancel() + <-object.Done() return tc.err }, }