Skip to content

Commit

Permalink
fix TestPutGetStream
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jl committed Dec 11, 2024
1 parent 6040d01 commit 1ecb657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connection_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ func getFileStream(ctx context.Context) (*bytes.Buffer, error) {

// read a small amount of data to check if file stream will be used
buf := make([]byte, defaultStringBufferSize)
_, err := r.Read(buf)
n, err := r.Read(buf)
if err != nil {
return nil, err
}
return bytes.NewBuffer(buf), nil
return bytes.NewBuffer(buf[:n]), nil
}

func getFileTransferOptions(ctx context.Context) *SnowflakeFileTransferOptions {
Expand Down

0 comments on commit 1ecb657

Please sign in to comment.