diff --git a/weed/s3api/stats_test.go b/weed/s3api/stats_test.go index 7b651b4863..1e0f892c1f 100644 --- a/weed/s3api/stats_test.go +++ b/weed/s3api/stats_test.go @@ -105,7 +105,7 @@ func TestPutStagesRecordEachStage(t *testing.T) { r = timeBodyReads(r) stages := newPutStages(r) - result, err := stages.upload(context.Background(), r.Body, stagedUploadOption(20*time.Millisecond, nil)) + result, err := stages.upload(context.Background(), io.LimitReader(r.Body, 8), stagedUploadOption(20*time.Millisecond, nil)) require.NoError(t, err) require.Len(t, result.FileChunks, 2) time.Sleep(5 * time.Millisecond)