Skip to content

Commit 2d31b40

Browse files
authored
Merge pull request #867 from bhandras/test-flake-fixup
loop: do not error out on context done in the executor
2 parents d198bb8 + a107036 commit 2d31b40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

executor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (s *executor) run(mainCtx context.Context,
132132
defer s.wg.Done()
133133

134134
err := s.batcher.Run(mainCtx)
135-
if err != nil {
135+
if err != nil && !errors.Is(err, context.Canceled) {
136136
select {
137137
case batcherErrChan <- err:
138138
case <-mainCtx.Done():
@@ -229,10 +229,10 @@ func (s *executor) run(mainCtx context.Context,
229229
}
230230

231231
case err := <-blockErrorChan:
232-
return fmt.Errorf("block error: %v", err)
232+
return fmt.Errorf("block error: %w", err)
233233

234234
case err := <-batcherErrChan:
235-
return fmt.Errorf("batcher error: %v", err)
235+
return fmt.Errorf("batcher error: %w", err)
236236

237237
case <-mainCtx.Done():
238238
return mainCtx.Err()

0 commit comments

Comments
 (0)