From 2b5262198d23b1a7b65309175108124f4cdf91f6 Mon Sep 17 00:00:00 2001 From: Geert Jansen Date: Sat, 27 Jun 2026 21:56:40 +0000 Subject: [PATCH] test(fs/handle): fix BufferedReader resource leak timeout in file_test In Test_ReadWithReadManager_ConcurrentReadsWithBufferedReader: Added invocation of resp.Callback() after validating each read response to correctly release outstanding data slice references held by the BufferedReader. Without this callback, BufferedReader.Destroy would wait until a 10-second timeout expired before releasing resources, causing the test case to hang for 10.15 seconds and print a warning. With the callback, the test executes cleanly in 0.15s (a ~67x speedup). TAG=agy CONV=8c7b5ab6-91ae-4a84-911e-1788917d5ab8 --- internal/fs/handle/file_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/fs/handle/file_test.go b/internal/fs/handle/file_test.go index e3accd52f63..a83b0718059 100644 --- a/internal/fs/handle/file_test.go +++ b/internal/fs/handle/file_test.go @@ -1441,6 +1441,10 @@ func (t *fileTest) Test_ReadWithReadManager_ConcurrentReadsWithBufferedReader() Offset: offset, }, int32(readSize)) + if resp.Callback != nil { + defer resp.Callback() + } + assert.NoError(t.T(), err) assert.Equal(t.T(), readSize, resp.Size) results[index] = util.ConvertReadResponseToBytes(resp.Data, resp.Size)