mirror of https://github.com/go-gitea/gitea.git
test parall testing for creating issue with sqlite
This commit is contained in:
parent
a175f9805c
commit
bba7558011
|
@ -157,6 +157,7 @@ func TestAPICreateIssueParallel(t *testing.T) {
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(parentT *testing.T, i int) {
|
go func(parentT *testing.T, i int) {
|
||||||
|
defer wg.Done()
|
||||||
parentT.Run(fmt.Sprintf("ParallelCreateIssue_%d", i), func(t *testing.T) {
|
parentT.Run(fmt.Sprintf("ParallelCreateIssue_%d", i), func(t *testing.T) {
|
||||||
newTitle := title + strconv.Itoa(i)
|
newTitle := title + strconv.Itoa(i)
|
||||||
newBody := body + strconv.Itoa(i)
|
newBody := body + strconv.Itoa(i)
|
||||||
|
@ -177,8 +178,6 @@ func TestAPICreateIssueParallel(t *testing.T) {
|
||||||
Content: newBody,
|
Content: newBody,
|
||||||
Title: newTitle,
|
Title: newTitle,
|
||||||
})
|
})
|
||||||
|
|
||||||
wg.Done()
|
|
||||||
})
|
})
|
||||||
}(t, i)
|
}(t, i)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue