Skip known flaky queue tests on CI environment ()

Random CI failures are annoying. It's better to just skip the affected
tests so maintainers can use their valuable time for more productive
topics.

Related: https://github.com/go-gitea/gitea/issues/23608
Related: https://github.com/go-gitea/gitea/issues/23977
Related: https://github.com/go-gitea/gitea/issues/18703
This commit is contained in:
silverwind
2023-04-29 11:53:11 +02:00
committed by GitHub
parent 9cf721e446
commit fc62992518
2 changed files with 9 additions and 0 deletions

@ -4,6 +4,7 @@
package queue package queue
import ( import (
"os"
"sync" "sync"
"testing" "testing"
"time" "time"
@ -101,6 +102,9 @@ func TestChannelQueue_Batch(t *testing.T) {
} }
func TestChannelQueue_Pause(t *testing.T) { func TestChannelQueue_Pause(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping because test is flaky on CI")
}
lock := sync.Mutex{} lock := sync.Mutex{}
var queue Queue var queue Queue
var err error var err error

@ -4,6 +4,7 @@
package queue package queue
import ( import (
"os"
"strconv" "strconv"
"sync" "sync"
"testing" "testing"
@ -15,6 +16,10 @@ import (
) )
func TestPersistableChannelUniqueQueue(t *testing.T) { func TestPersistableChannelUniqueQueue(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping because test is flaky on CI")
}
tmpDir := t.TempDir() tmpDir := t.TempDir()
_ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`) _ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`)