fix fd lingering'

This commit is contained in:
Shreyas Goenka 2024-12-31 12:47:47 +05:30
parent 932aeee349
commit 9d8ba099ba
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 2 additions and 0 deletions

View File

@ -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)