Skip to content

Commit 8636538

Browse files
committed
fix: goroutine WaitGroup race in test
1 parent 8ebe994 commit 8636538

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxy/server/session_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ func TestSessionRunInTxNamespaceChangedWithMock(t *testing.T) {
173173
seList[i] = se
174174
}
175175
for _, se := range seList {
176+
g.Add(1)
176177
go func(se *SessionExecutor) {
177-
g.Add(1)
178178
defer g.Done()
179179
se.ksConns = make(map[string]backend.PooledConnect)
180180
se.status = se.status | mysql.ServerStatusInTrans

0 commit comments

Comments
 (0)