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
test(sources/s3): fix infinite blocking and timeout issue in TestSource_Chunks (#4048)
This PR addresses two issues:
Duplicate test functions in s3_integration_test.go.
The file currently contains two separate TestSourceChunksNoResumption. The only differences between them are the use of t.Parallel() in one and the bucket name. This PR merges both into a single, table-driven test
Possible infinite block in TestSource_Chunks
As reported in f#4069 (comment), the test TestSource_Chunks in s3_test.go may block indefinitely. This is due to the use of an unbuffered channel (chunksCh), combined with only a single receive operation (gotChunk := <-chunksCh). If the test bucket contains more than one chunk, the s.Chunks(ctx, chunksCh) call will block, causing the test to hang.
See #4048 (comment) for full explanation.
* test(sources/s3): remove duplicate integration test case
Signed-off-by: Eng Zer Jun <[email protected]>
* Merge two TestSourceChunksNoResumption into table-driven test
Signed-off-by: Eng Zer Jun <[email protected]>
* Fix infinite blocking and timeout issue in TestSource_Chunks
Signed-off-by: Eng Zer Jun <[email protected]>
* Drain `chunksCh` channel
Reference: #4048 (review)
Signed-off-by: Eng Zer Jun <[email protected]>
* Add missing return for ctx.Done() case
Signed-off-by: Eng Zer Jun <[email protected]>
---------
Signed-off-by: Eng Zer Jun <[email protected]>
0 commit comments