Closed emilaleksanteri closed 1 month ago
The tests are failing now because they are running out of memory: https://github.com/tus/tusd/actions/runs/8983182072/job/24727119301?pr=1131
The test has probably be adjusted, so that io.ReadAll can terminate.
The tests are failing now because they are running out of memory: https://github.com/tus/tusd/actions/runs/8983182072/job/24727119301?pr=1131
The test has probably be adjusted, so that io.ReadAll can terminate.
On it, can I run the tests for the gcsstore with just go test or is there some other stuff I should know for local dev on the repo?
Thanks, running go test ./pkg/gcsstore
is sufficient.
@Acconut switched io.ReadAll to io.ReadFull from a buffer size of the ReadObject reader, this seemed to also solve the EOF issue and solved all the issues with the tests.
Thanks for your update, but I still prefer using io.ReadAll
instead of relying on Size()
to give us a correct file size. I added a commit, switching to io.ReadAll
, but also adjusting the tests, which had a custom implementation of GCSReader, which never returned an EOF, causing io.ReadAll
to run out of memory.
Change r.Read(buf) to io.ReadFull(buf) as discussed in issue #1124 to fix EOF error on .info read from GCS