Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb00cd2

Browse files
fix(agent/agentcontainers): fixTestAPI/NoUpdaterLoopLogspam flake (#18905)
1 parentaae5fc2 commitfb00cd2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎agent/agentcontainers/api_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,22 @@ func TestAPI(t *testing.T) {
358358
fakeCLI=&fakeContainerCLI{
359359
listErr:firstErr,
360360
}
361+
fWatcher=newFakeWatcher(t)
361362
)
362363

363364
api:=agentcontainers.NewAPI(logger,
365+
agentcontainers.WithWatcher(fWatcher),
364366
agentcontainers.WithClock(mClock),
365367
agentcontainers.WithContainerCLI(fakeCLI),
366368
)
367369
api.Start()
368370
deferapi.Close()
369371

372+
// The watcherLoop writes a log when it is initialized.
373+
// We want to ensure this has happened before we start
374+
// the test so that it does not intefere.
375+
fWatcher.waitNext(ctx)
376+
370377
// Make sure the ticker function has been registered
371378
// before advancing the clock.
372379
tickerTrap.MustWait(ctx).MustRelease(ctx)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp