diff --git a/test/e2e/flowaggregator_test.go b/test/e2e/flowaggregator_test.go index 837fed5c643..8475134f194 100644 --- a/test/e2e/flowaggregator_test.go +++ b/test/e2e/flowaggregator_test.go @@ -1404,13 +1404,11 @@ func getUint64FieldFromRecord(t *testing.T, record string, field string) uint64 func getCollectorOutput(t *testing.T, srcIP, dstIP, srcPort string, isDstService bool, checkAllRecords bool, isIPv6 bool, data *TestData, labelFilter string) (string, []string) { var collectorOutput string var recordSlices []string - fetchTimes := 1 // In the ToExternalFlows test, flow record will arrive 5.5s (exporterActiveFlowExportTimeout+aggregatorActiveFlowRecordTimeout) after executing wget command // We set the timeout to 9s (5.5s plus one more aggregatorActiveFlowRecordTimeout) to make the ToExternalFlows test more stable - err := wait.PollImmediate(500*time.Millisecond, exporterActiveFlowExportTimeout+aggregatorActiveFlowRecordTimeout*2, func() (bool, error) { + err := wait.PollImmediate(defaultInterval, defaultTimeout, func() (bool, error) { var rc int var err error - fetchTimes++ // `pod-running-timeout` option is added to cover scenarios where ipfix flow-collector has crashed after being deployed rc, collectorOutput, _, err = data.RunCommandOnNode(controlPlaneNodeName(), fmt.Sprintf("kubectl logs --pod-running-timeout=%v ipfix-collector -n %s", aggregatorInactiveFlowRecordTimeout.String(), data.testNamespace)) if err != nil || rc != 0 { @@ -1464,7 +1462,7 @@ func getClickHouseOutput(t *testing.T, data *TestData, srcIP, dstIP, srcPort str } // ClickHouse output expected to be checked after IPFIX collector. // Waiting additional 4x commit interval to be adequate for 3 commit attempts. - err := wait.PollImmediate(500*time.Millisecond, aggregatorClickHouseCommitInterval*4, func() (bool, error) { + err := wait.PollImmediate(defaultInterval, defaultTimeout, func() (bool, error) { queryOutput, _, err := data.RunCommandFromPod(flowVisibilityNamespace, clickHousePodName, "clickhouse", cmd) if err != nil { return false, err