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 7366c0f commit cd542f1
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
}

Check warning on line 171 in connection_util.go

View check run for this annotation

Codecov / codecov/patch

connection_util.go#L170-L171

Added lines #L170 - L171 were not covered by tests
return bytes.NewBuffer(buf), nil
return bytes.NewBuffer(buf[:n]), nil
}

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

0 comments on commit cd542f1

Please sign in to comment.