From 9d8ba099bae7946d047b3906be8abe71a059efd3 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 31 Dec 2024 12:47:47 +0530 Subject: [PATCH] fix fd lingering' --- libs/filer/dbfs_client_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/filer/dbfs_client_test.go b/libs/filer/dbfs_client_test.go index d08c73cf7..a95a9e4bc 100644 --- a/libs/filer/dbfs_client_test.go +++ b/libs/filer/dbfs_client_test.go @@ -55,6 +55,7 @@ func TestDbfsClientForSmallFiles(t *testing.T) { // write file to DBFS fd, err := os.Open(localPath) + defer fd.Close() require.NoError(t, err) err = dbfsClient.Write(context.Background(), "hello.txt", fd) require.NoError(t, err) @@ -114,6 +115,7 @@ func TestDbfsClientForLargerFiles(t *testing.T) { // write file to DBFS fd, err := os.Open(localPath) + defer fd.Close() require.NoError(t, err) err = dbfsClient.Write(context.Background(), "hello.txt", fd) require.NoError(t, err)