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

Commitbd3d0ea

Browse files
fix(agent/agentcontainers): fixTestAPI/IgnoreCustomization flake (#18863)
1 parent87e5365 commitbd3d0ea

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎agent/agentcontainers/api_test.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,8 +2883,12 @@ func TestAPI(t *testing.T) {
28832883
Op:fsnotify.Write,
28842884
})
28852885

2886-
err=api.RefreshContainers(ctx)
2887-
require.NoError(t,err)
2886+
require.Eventuallyf(t,func()bool {
2887+
err=api.RefreshContainers(ctx)
2888+
require.NoError(t,err)
2889+
2890+
returnlen(fakeSAC.agents)==1
2891+
},testutil.WaitShort,testutil.IntervalFast,"subagent should be created after config change")
28882892

28892893
t.Log("Phase 2: Cont, waiting for sub agent to exit")
28902894
exitSubAgentOnce.Do(func() {
@@ -2919,8 +2923,12 @@ func TestAPI(t *testing.T) {
29192923
Op:fsnotify.Write,
29202924
})
29212925

2922-
err=api.RefreshContainers(ctx)
2923-
require.NoError(t,err)
2926+
require.Eventuallyf(t,func()bool {
2927+
err=api.RefreshContainers(ctx)
2928+
require.NoError(t,err)
2929+
2930+
returnlen(fakeSAC.agents)==0
2931+
},testutil.WaitShort,testutil.IntervalFast,"subagent should be deleted after config change")
29242932

29252933
req=httptest.NewRequest(http.MethodGet,"/",nil).WithContext(ctx)
29262934
rec=httptest.NewRecorder()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp