You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index_test.go 523B

123456789101112131415161718192021222324252627
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package models
  5. import (
  6. "fmt"
  7. "sync"
  8. "testing"
  9. "github.com/stretchr/testify/assert"
  10. )
  11. func TestResourceIndex(t *testing.T) {
  12. assert.NoError(t, PrepareTestDatabase())
  13. var wg sync.WaitGroup
  14. for i := 0; i < 100; i++ {
  15. wg.Add(1)
  16. go func(i int) {
  17. testInsertIssue(t, fmt.Sprintf("issue %d", i+1), "my issue", 0)
  18. wg.Done()
  19. }(i)
  20. }
  21. wg.Wait()
  22. }