From 872d8a8399d9d782b9fe95929e029d158da999c1 Mon Sep 17 00:00:00 2001 From: Yashash H L Date: Sat, 6 Apr 2024 20:38:13 +0530 Subject: [PATCH] fix: flaky TestDropOnFull (#1647) Signed-off-by: Yashash H L --- test/e2e/functional_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/functional_test.go b/test/e2e/functional_test.go index 1f6d3817d2..7427945353 100644 --- a/test/e2e/functional_test.go +++ b/test/e2e/functional_test.go @@ -240,7 +240,8 @@ func (s *FunctionalSuite) TestDropOnFull() { time.Sleep(time.Second * 5) w.SendMessageTo(pipelineName, "in", NewHttpPostRequest().WithBody([]byte("2"))) - expectedDropMetric := `forwarder_drop_total{partition_name="numaflow-system-drop-on-full-sink-0",pipeline="drop-on-full",replica="0",vertex="in",vertex_type="Source"} 1` + expectedDropMetricOne := `forwarder_drop_total{partition_name="numaflow-system-drop-on-full-sink-0",pipeline="drop-on-full",replica="0",vertex="in",vertex_type="Source"} 1` + expectedDropMetricTwo := `forwarder_drop_total{partition_name="numaflow-system-drop-on-full-sink-1",pipeline="drop-on-full",replica="0",vertex="in",vertex_type="Source"} 1` // wait for the drop metric to be updated, time out after 10s. timeoutChan := time.After(time.Second * 10) ticker := time.NewTicker(time.Second * 2) @@ -251,7 +252,7 @@ func (s *FunctionalSuite) TestDropOnFull() { metricsString := HTTPExpect(s.T(), "https://localhost:8001").GET("/metrics"). Expect(). Status(200).Body().Raw() - if strings.Contains(metricsString, expectedDropMetric) { + if strings.Contains(metricsString, expectedDropMetricOne) || strings.Contains(metricsString, expectedDropMetricTwo) { return } case <-timeoutChan: