From ccaf21ac2e5662aec587f5d34692a2146f271820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vila=C3=A7a?= Date: Thu, 14 Mar 2024 12:07:57 +0000 Subject: [PATCH] Replace test 'Eventually-Consistently' with 'Eventually-MustPassRepeatedly' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Vilaça --- tests/monitoring_test.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/monitoring_test.go b/tests/monitoring_test.go index 1cfde4c10..164d78d86 100644 --- a/tests/monitoring_test.go +++ b/tests/monitoring_test.go @@ -331,18 +331,7 @@ func alertShouldNotBeActive(alertName string) { return nil } return fmt.Errorf("alert %s found", alertName) - }, env.Timeout(), time.Second).ShouldNot(HaveOccurred()) - - ConsistentlyWithOffset(1, func() error { - alert, err := checkAlert(alertName) - if err != nil { - return err - } - if alert == nil || alert.State == "inactive" { - return nil - } - return fmt.Errorf("alert %s found", alertName) - }, env.ShortTimeout(), time.Second).ShouldNot(HaveOccurred()) + }, env.Timeout(), 10*time.Second).MustPassRepeatedly(10).ShouldNot(HaveOccurred()) } func waitForSeriesToBeDetected(seriesName string) {