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

Commitac01764

Browse files
mafredriEdwardAngert
authored andcommitted
test(agent/agentcontainers): fix test data race due to list manipulation (#18250)
Fixescoder/internal#675
1 parent92f4b22 commitac01764

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎agent/agentcontainers/api.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ func (api *API) updateContainers(ctx context.Context) error {
378378

379379
returnxerrors.Errorf("list containers failed: %w",err)
380380
}
381+
// Clone to avoid test flakes due to data manipulation.
382+
updated.Containers=slices.Clone(updated.Containers)
381383

382384
api.mu.Lock()
383385
deferapi.mu.Unlock()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp