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

Commitc40cee0

Browse files
committed
fix: remove hold WaitGroup in TestConcurrentFetch
1 parent9fd33a7 commitc40cee0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎coderd/files/cache_test.go‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,15 @@ func TestConcurrentFetch(t *testing.T) {
100100
ctx:=dbauthz.AsFileReader(testutil.Context(t,testutil.WaitShort))
101101

102102
// Expect 2 calls to Acquire before we continue the test
103-
var (
104-
hold sync.WaitGroup
105-
wg sync.WaitGroup
106-
)
103+
varwg sync.WaitGroup
107104

105+
wg.Add(2)
108106
forrange2 {
109-
hold.Add(1)
110107
// TODO: wg.Go in Go 1.25
111-
wg.Add(1)
112108
gofunc() {
113109
deferwg.Done()
114-
hold.Done()
115-
hold.Wait()
116110
_,err:=cache.Acquire(ctx,dbM,fileID)
117-
require.NoError(t,err)
111+
assert.NoError(t,err)
118112
}()
119113
}
120114

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp