diff --git a/pkg/compose/watch_test.go b/pkg/compose/watch_test.go index 036e1677be..9a1fdbedd4 100644 --- a/pkg/compose/watch_test.go +++ b/pkg/compose/watch_test.go @@ -60,7 +60,8 @@ func TestDebounceBatching(t *testing.T) { ch <- *event } // we sent 100 events + the debouncer - clock.BlockUntil(101) + err := clock.BlockUntilContext(ctx, 101) + assert.NilError(t, err) clock.Advance(quietPeriod) select { case batch := <-eventBatchCh: @@ -73,7 +74,8 @@ func TestDebounceBatching(t *testing.T) { case <-time.After(50 * time.Millisecond): t.Fatal("timed out waiting for events") } - clock.BlockUntil(1) + err = clock.BlockUntilContext(ctx, 1) + assert.NilError(t, err) clock.Advance(quietPeriod) // there should only be a single batch @@ -191,7 +193,8 @@ func TestWatch_Sync(t *testing.T) { watcher.Events() <- watch.NewFileEvent("/sync/changed") watcher.Events() <- watch.NewFileEvent("/sync/changed/sub") - clock.BlockUntil(3) + err := clock.BlockUntilContext(ctx, 3) + assert.NilError(t, err) clock.Advance(quietPeriod) select { case actual := <-syncer.synced: @@ -206,7 +209,8 @@ func TestWatch_Sync(t *testing.T) { watcher.Events() <- watch.NewFileEvent("/sync/ignore") watcher.Events() <- watch.NewFileEvent("/sync/ignore/sub") watcher.Events() <- watch.NewFileEvent("/sync/changed") - clock.BlockUntil(4) + err = clock.BlockUntilContext(ctx, 4) + assert.NilError(t, err) clock.Advance(quietPeriod) select { case actual := <-syncer.synced: @@ -219,7 +223,8 @@ func TestWatch_Sync(t *testing.T) { watcher.Events() <- watch.NewFileEvent("/rebuild") watcher.Events() <- watch.NewFileEvent("/sync/changed") - clock.BlockUntil(4) + err = clock.BlockUntilContext(ctx, 4) + assert.NilError(t, err) clock.Advance(quietPeriod) select { case batch := <-syncer.synced: