Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Schalm <[email protected]>
  • Loading branch information
tim-barry and jordanschalm authored Dec 20, 2024
1 parent c7a85f7 commit d3a1438
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions engine/execution/ingestion/uploader/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func NewAsyncUploader(uploader Uploader,
metrics: metrics,
retryInitialTimeout: retryInitialTimeout,
maxRetryNumber: maxRetryNumber,
// we use a channel rather than a Fifoqueue here because a Fifoqueue might drop items when full,
// but it is not acceptable to skip uploading an execution result
queue: make(chan *execution.ComputationResult, 100),
}
builder := component.NewComponentManagerBuilder()
Expand Down
2 changes: 1 addition & 1 deletion engine/execution/ingestion/uploader/uploader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func Test_AsyncUploader(t *testing.T) {
err := async.Upload(computationResult)
require.NoError(t, err)

wgUploadCalleded.Wait()
unittest.AssertReturnsBefore(t, wgUploadCalleded.Wait, time.Second)
cancel()
unittest.AssertClosesBefore(t, async.Done(), 1*time.Second, "async uploader not done in time")

Expand Down

0 comments on commit d3a1438

Please sign in to comment.