From c72d9078f2d293c9b096b25fec30177d06ebe4a2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 29 Apr 2023 09:21:53 +0200 Subject: [PATCH 1/2] Skip known flaky tests --- modules/queue/queue_channel_test.go | 1 + modules/queue/unique_queue_disk_channel_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/modules/queue/queue_channel_test.go b/modules/queue/queue_channel_test.go index 9b92398bacd96..9628d8fb9b528 100644 --- a/modules/queue/queue_channel_test.go +++ b/modules/queue/queue_channel_test.go @@ -101,6 +101,7 @@ func TestChannelQueue_Batch(t *testing.T) { } func TestChannelQueue_Pause(t *testing.T) { + 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 f75c69f785150..6fe8a9663f216 100644 --- a/modules/queue/unique_queue_disk_channel_test.go +++ b/modules/queue/unique_queue_disk_channel_test.go @@ -15,6 +15,8 @@ import ( ) func TestPersistableChannelUniqueQueue(t *testing.T) { + t.Skip("Skipping because test is flaky on CI") + tmpDir := t.TempDir() _ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`) From 031321f4201de0443607c3421ed7bd9e2ae984bb Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 29 Apr 2023 09:38:07 +0200 Subject: [PATCH 2/2] check for ci --- modules/queue/queue_channel_test.go | 5 ++++- modules/queue/unique_queue_disk_channel_test.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/queue/queue_channel_test.go b/modules/queue/queue_channel_test.go index 9628d8fb9b528..f9dae742e29d3 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,7 +102,9 @@ func TestChannelQueue_Batch(t *testing.T) { } func TestChannelQueue_Pause(t *testing.T) { - t.Skip("Skipping because test is flaky on CI") + 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 6fe8a9663f216..e2fe4aceee576 100644 --- a/modules/queue/unique_queue_disk_channel_test.go +++ b/modules/queue/unique_queue_disk_channel_test.go @@ -4,6 +4,7 @@ package queue import ( + "os" "strconv" "sync" "testing" @@ -15,7 +16,9 @@ import ( ) func TestPersistableChannelUniqueQueue(t *testing.T) { - t.Skip("Skipping because test is flaky on CI") + if os.Getenv("CI") != "" { + t.Skip("Skipping because test is flaky on CI") + } tmpDir := t.TempDir() _ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`)