1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix generate index failure possibility on postgres (#21998)

@wxiaoguang Please review

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Lunny Xiao
2022-12-02 11:15:36 +08:00
committed by GitHub
parent 64973cf18f
commit f7ade6de7c
3 changed files with 40 additions and 2 deletions

View File

@@ -135,8 +135,8 @@ func TestRepoCommitsStatusParallel(t *testing.T) {
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func(t *testing.T, i int) {
t.Run(fmt.Sprintf("ParallelCreateStatus_%d", i), func(t *testing.T) {
go func(parentT *testing.T, i int) {
parentT.Run(fmt.Sprintf("ParallelCreateStatus_%d", i), func(t *testing.T) {
runBody := doAPICreateCommitStatus(NewAPITestContext(t, "user2", "repo1"), path.Base(commitURL), api.CommitStatusState("pending"))
runBody(t)
wg.Done()