From b16782dcf9ebf8eeec75fc96f3ee7fd44c6cb58c Mon Sep 17 00:00:00 2001 From: pingqiu Date: Thu, 19 Nov 2026 21:13:15 -0800 Subject: [PATCH] test: require upload retries to reach the caller deadline --- seaweed-block/core/storage/chunk_upload_retry_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/seaweed-block/core/storage/chunk_upload_retry_test.go b/seaweed-block/core/storage/chunk_upload_retry_test.go index 4c20a1ef59..a90f36de28 100644 --- a/seaweed-block/core/storage/chunk_upload_retry_test.go +++ b/seaweed-block/core/storage/chunk_upload_retry_test.go @@ -173,8 +173,11 @@ func TestChunkCutUploadDeadlineBoundRetainsDirt(t *testing.T) { w.write(t, s, 0, 0x51) ctx, cancel := context.WithTimeout(context.Background(), 1700*time.Millisecond) defer cancel() - if _, err := layer.Cut(ctx); err == nil { - t.Fatal("persistent upload outage published") + if _, err := layer.Cut(ctx); !errors.Is(err, context.DeadlineExceeded) { + t.Fatalf("persistent upload outage ended before caller deadline: %v", err) + } + if !errors.Is(ctx.Err(), context.DeadlineExceeded) { + t.Fatalf("upload retry returned before caller context expired: %v", ctx.Err()) } if layer.Stats().CutsAborted["upload"] != 1 { t.Fatal("missing upload abort status")