You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/eikemeier/sendfiletest.git
cd sendfiletest
go test .
What did you see happen?
--- FAIL: TestSendfile (0.22s)
sendfile_test.go:111: received 354712352 bytes; expected 1073741824
sendfile_test.go:115: retrieved data hash did not match
sendfile_test.go:119: sent 354712352 bytes; expected 1073741824
FAIL
FAIL github.com/eikemeier/sendfiletest 0.419s
FAIL
What did you expect to see?
ok github.com/eikemeier/sendfiletest 0.823s
If you prevent the usage of sendfile by commenting in the line f := io.NopCloser(f) (hiding the underlying os.File), the test runs though. Also, when you send smaller files.
The test is a simplified copy of go1.23.2/src/net/sendfile_test.go, but creates and sends a larger test file than the one used in the repository.
The text was updated successfully, but these errors were encountered:
Go version
go version go1.23.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Run the sample from github.com/eikemeier/sendfiletest:
What did you see happen?
What did you expect to see?
If you prevent the usage of sendfile by commenting in the line
f := io.NopCloser(f)
(hiding the underlyingos.File
), the test runs though. Also, when you send smaller files.The test is a simplified copy of go1.23.2/src/net/sendfile_test.go, but creates and sends a larger test file than the one used in the repository.
The text was updated successfully, but these errors were encountered: