(ctx context.Context)
| 558 | } |
| 559 | |
| 560 | func (f *notifyFixture) consumeEventsInBackground(ctx context.Context) chan error { |
| 561 | done := make(chan error) |
| 562 | go func() { |
| 563 | for { |
| 564 | select { |
| 565 | case <-f.ctx.Done(): |
| 566 | close(done) |
| 567 | return |
| 568 | case <-ctx.Done(): |
| 569 | close(done) |
| 570 | return |
| 571 | case err := <-f.notify.Errors(): |
| 572 | done <- err |
| 573 | close(done) |
| 574 | return |
| 575 | case <-f.notify.Events(): |
| 576 | } |
| 577 | } |
| 578 | }() |
| 579 | return done |
| 580 | } |
| 581 | |
| 582 | func (f *notifyFixture) fsync() { |
| 583 | f.fsyncWithRetryCount(3) |
no test coverage detected