aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-30 21:25:42 +0200
committerGitHub <noreply@github.com>2023-04-30 15:25:42 -0400
commitf1a0b641090bee7336e94d76ac6a89f479ea070c (patch)
tree487ab04052da84611785d823d679b8ba4d65b4e6
parentbfdbc626cb2a02ac85f94ad4da56131eea8530d9 (diff)
downloadgitea-f1a0b641090bee7336e94d76ac6a89f479ea070c.tar.gz
gitea-f1a0b641090bee7336e94d76ac6a89f479ea070c.zip
Skip known flaky `queue` tests on CI environment (#24443)
Backport of https://github.com/go-gitea/gitea/pull/24419 to 1.19.
-rw-r--r--modules/queue/queue_channel_test.go4
-rw-r--r--modules/queue/unique_queue_disk_channel_test.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/queue/queue_channel_test.go b/modules/queue/queue_channel_test.go
index 9b92398bac..f9dae742e2 100644
--- a/modules/queue/queue_channel_test.go
+++ b/modules/queue/queue_channel_test.go
@@ -4,6 +4,7 @@
package queue
import (
+ "os"
"sync"
"testing"
"time"
@@ -101,6 +102,9 @@ func TestChannelQueue_Batch(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{}
var queue Queue
var err error
diff --git a/modules/queue/unique_queue_disk_channel_test.go b/modules/queue/unique_queue_disk_channel_test.go
index fd76163f4a..7417d74c0b 100644
--- a/modules/queue/unique_queue_disk_channel_test.go
+++ b/modules/queue/unique_queue_disk_channel_test.go
@@ -5,6 +5,7 @@ package queue
import (
"fmt"
+ "os"
"strconv"
"sync"
"testing"
@@ -16,6 +17,9 @@ import (
)
func TestPersistableChannelUniqueQueue(t *testing.T) {
+ if os.Getenv("CI") != "" {
+ t.Skip("Skipping because test is flaky on CI")
+ }
tmpDir := t.TempDir()
fmt.Printf("TempDir %s\n", tmpDir)
_ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`)