diff --git a/agent/agentcontainers/api_test.go b/agent/agentcontainers/api_test.go index 9451461bb3215..eb75d5a62b661 100644 --- a/agent/agentcontainers/api_test.go +++ b/agent/agentcontainers/api_test.go @@ -358,15 +358,22 @@ func TestAPI(t *testing.T) { fakeCLI = &fakeContainerCLI{ listErr: firstErr, } + fWatcher = newFakeWatcher(t) ) api := agentcontainers.NewAPI(logger, + agentcontainers.WithWatcher(fWatcher), agentcontainers.WithClock(mClock), agentcontainers.WithContainerCLI(fakeCLI), ) api.Start() defer api.Close() + // The watcherLoop writes a log when it is initialized. + // We want to ensure this has happened before we start + // the test so that it does not intefere. + fWatcher.waitNext(ctx) + // Make sure the ticker function has been registered // before advancing the clock. tickerTrap.MustWait(ctx).MustRelease(ctx) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy