Skip to content

Commit

Permalink
fix: flaky TestDropOnFull (#1647)
Browse files Browse the repository at this point in the history
Signed-off-by: Yashash H L <[email protected]>
  • Loading branch information
yhl25 authored Apr 6, 2024
1 parent 645a694 commit 872d8a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 872d8a8

Please sign in to comment.