Skip to content

Commit

Permalink
[CENNSO-1566] fix: ipfix test reporting interval timing
Browse files Browse the repository at this point in the history
This test requires at least 4 reports and UDP traffic generation wasn't
running long enough to supply them
  • Loading branch information
mogaika committed Jan 15, 2024
1 parent b3501e5 commit 5bfcb66
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/e2e/ipfix_e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,21 @@ func describeIPFIX(title string, mode framework.UPGMode, ipMode framework.UPGIPM
v := &ipfixVerifier{f: f}
v.withNWIIPFIXPolicy("dest")
v.withIPFIXHandler()
v.withReportingInterval(7)
const INTERVAL = 7 // 7 seconds so we receive ipfix flow description
const MIN_REPORTS_FOR_CHECK = 4
v.withReportingInterval(INTERVAL)
ginkgo.It("can be set via NWI", func() {
trafficCfg := smallVolumeHTTPConfig(nil)
// Make sure the flow lasts long enough to measure the intervals
trafficCfg.ChunkCount = 50
trafficCfg.ChunkDelay = 500 * time.Millisecond
trafficCfg.ChunkCount = MIN_REPORTS_FOR_CHECK * (INTERVAL + 1)
trafficCfg.ChunkDelay = time.Second
v.verifyIPFIX(ipfixVerifierCfg{
trafficCfg: trafficCfg,
protocol: layers.IPProtocolTCP,
expectedTrafficPort: 80,
})
v.verifyIPFIXDestRecords()
v.verifyReportingInterval(7)
v.verifyReportingInterval(INTERVAL)
})
})
})
Expand Down

0 comments on commit 5bfcb66

Please sign in to comment.