Skip to content

Commit

Permalink
[networks] Increase tolerance of e2e test to 200ms (#34448)
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlu authored Feb 25, 2025
1 parent e1841bc commit 719fa8d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/new-e2e/tests/npm/common_1host.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func test1HostFakeIntakeNPM[Env any](v *e2e.BaseSuite[Env], FakeIntake *componen
// test1HostFakeIntakeNPM600cnxBucket Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func test1HostFakeIntakeNPM600cnxBucket[Env any](v *e2e.BaseSuite[Env], FakeIntake *components.FakeIntake) {
t := v.T()
t.Helper()
Expand All @@ -125,7 +125,7 @@ func test1HostFakeIntakeNPM600cnxBucket[Env any](v *e2e.BaseSuite[Env], FakeInta
t.Logf("hostname+networkID %v seen connections", hostnameNetID)
}, 60*time.Second, time.Second, "no connections received")

// looking for x payloads (with max 600 connections) and check if the last 2 have a max span of 100ms
// looking for x payloads (with max 600 connections) and check if the last 2 have a max span of 200ms
v.EventuallyWithT(func(c *assert.CollectT) {
cnx, err := FakeIntake.Client().GetConnections()
assert.NoError(t, err)
Expand All @@ -150,7 +150,7 @@ func test1HostFakeIntakeNPM600cnxBucket[Env any](v *e2e.BaseSuite[Env], FakeInta
dt := latestPayloadTime.Sub(cnx600PayloadTime).Seconds()
t.Logf("hostname+networkID %v diff time %f seconds", targetHostnameNetID, dt)

assert.Greater(t, 0.1, dt, "delta between collection is higher than 100ms")
assert.Greater(t, 0.2, dt, "delta between collection is higher than 200ms")
}, 90*time.Second, time.Second, "not enough connections received")
}

Expand Down
4 changes: 2 additions & 2 deletions test/new-e2e/tests/npm/ec2_1host_containerized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (v *ec2VMContainerizedSuite) TestFakeIntakeNPM_DockerRequests() {
// TestFakeIntakeNPM600cnxBucket_HostRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMContainerizedSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand All @@ -156,7 +156,7 @@ func (v *ec2VMContainerizedSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
// TestFakeIntakeNPM600cnxBucket_DockerRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMContainerizedSuite) TestFakeIntakeNPM600cnxBucket_DockerRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand Down
4 changes: 2 additions & 2 deletions test/new-e2e/tests/npm/ec2_1host_selinux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (v *ec2VMSELinuxSuite) TestFakeIntakeNPM_DockerRequests() {
// TestFakeIntakeNPM600cnxBucket_HostRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMSELinuxSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand All @@ -112,7 +112,7 @@ func (v *ec2VMSELinuxSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
// TestFakeIntakeNPM600cnxBucket_DockerRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMSELinuxSuite) TestFakeIntakeNPM600cnxBucket_DockerRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand Down
4 changes: 2 additions & 2 deletions test/new-e2e/tests/npm/ec2_1host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (v *ec2VMSuite) TestFakeIntakeNPM_DockerRequests() {
// TestFakeIntakeNPM600cnxBucket_HostRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand All @@ -158,7 +158,7 @@ func (v *ec2VMSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
// TestFakeIntakeNPM600cnxBucket_DockerRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMSuite) TestFakeIntakeNPM600cnxBucket_DockerRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand Down
2 changes: 1 addition & 1 deletion test/new-e2e/tests/npm/ec2_1host_wkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (v *ec2VMWKitSuite) Test00FakeIntakeNPM_HostRequests() {
// TestFakeIntakeNPM600cnxBucket_HostRequests Validate the agent can communicate with the (fake) backend and send connections
// every 30 seconds with a maximum of 600 connections per payloads, if more another payload will follow.
// - looking for 1 host to send CollectorConnections payload to the fakeintake
// - looking for n payloads and check if the last 2 have a maximum span of 100ms
// - looking for n payloads and check if the last 2 have a maximum span of 200ms
func (v *ec2VMWKitSuite) TestFakeIntakeNPM600cnxBucket_HostRequests() {
testURL := "http://" + v.Env().HTTPBinHost.Address + "/"

Expand Down

0 comments on commit 719fa8d

Please sign in to comment.