Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Yun-Tang Hsu <[email protected]>
  • Loading branch information
Yun-Tang Hsu committed Dec 7, 2023
1 parent 2cc3ebc commit e93ece2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/e2e/flowaggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e93ece2

Please sign in to comment.