From 5bc985b3a55000cadab9c14aeeb2119cbd3d468c Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Mon, 8 Jul 2024 17:20:54 +0200 Subject: [PATCH 1/3] [chore] fix log queue load test Signed-off-by: Moritz Wiesinger --- testbed/tests/scenarios.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testbed/tests/scenarios.go b/testbed/tests/scenarios.go index 29fdfe393c14..f2c435b2152f 100644 --- a/testbed/tests/scenarios.go +++ b/testbed/tests/scenarios.go @@ -394,7 +394,7 @@ func ScenarioSendingQueuesFull( receiver, agentProc, &testbed.LogPresentValidator{ - LogBody: "sending_queue is full", + LogBody: "sending queue is full", Present: true, }, resultsSummary, @@ -412,10 +412,10 @@ func ScenarioSendingQueuesFull( tc.WaitForN(func() bool { return tc.LoadGenerator.DataItemsSent() > 0 }, time.Second*time.Duration(sleepTime), "load generator started") - // searchFunc checks for "sending_queue is full" communicate and sends the signal to GenerateNonPernamentErrorUntil + // searchFunc checks for "sending queue is full" communicate and sends the signal to GenerateNonPernamentErrorUntil // to generate only successes from that time on tc.WaitForN(func() bool { - logFound := tc.AgentLogsContains("sending_queue is full") + logFound := tc.AgentLogsContains("sending queue is full") if !logFound { dataChannel <- true return false @@ -423,7 +423,7 @@ func ScenarioSendingQueuesFull( tc.WaitFor(func() bool { return tc.MockBackend.DataItemsReceived() == 0 }, "no data successfully received before an error") close(dataChannel) return logFound - }, time.Second*time.Duration(sleepTime), "sending_queue errors present") + }, time.Second*time.Duration(sleepTime), "sending queue errors present") // check if data started to be received successfully tc.WaitForN(func() bool { @@ -475,7 +475,7 @@ func ScenarioSendingQueuesNotFull( receiver, agentProc, &testbed.LogPresentValidator{ - LogBody: "sending_queue is full", + LogBody: "sending queue is full", Present: false, }, resultsSummary, From e2196089ba6fa21e09ce396732250e5ef0359803 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 9 Jul 2024 09:39:51 +0200 Subject: [PATCH 2/3] debugging Signed-off-by: Moritz Wiesinger --- testbed/tests/scenarios.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testbed/tests/scenarios.go b/testbed/tests/scenarios.go index f2c435b2152f..57fa73fe08a3 100644 --- a/testbed/tests/scenarios.go +++ b/testbed/tests/scenarios.go @@ -355,6 +355,7 @@ func ScenarioTestTraceNoBackend10kSPS( t.Cleanup(tc.Stop) + tc.StartBackend() tc.StartAgent() tc.StartLoad(options) @@ -363,6 +364,8 @@ func ScenarioTestTraceNoBackend10kSPS( rss, _, err := tc.AgentMemoryInfo() require.NoError(t, err) assert.Less(t, configuration.ExpectedMinFinalRAM, rss) + tc.StopLoad() + tc.StopAgent() } func ScenarioSendingQueuesFull( @@ -402,8 +405,9 @@ func ScenarioSendingQueuesFull( testbed.WithDecisionFunc(func() error { return testbed.GenerateNonPernamentErrorUntil(dataChannel) }), ) + t.Cleanup(tc.Stop) + tc.MockBackend.EnableRecording() - defer tc.Stop() tc.StartBackend() tc.StartAgent() From 3517fd394f43c9aae7525867c6cf2f9666ab53c3 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 9 Jul 2024 11:29:19 +0200 Subject: [PATCH 3/3] remove additional stop calls Signed-off-by: Moritz Wiesinger --- testbed/tests/scenarios.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/testbed/tests/scenarios.go b/testbed/tests/scenarios.go index 57fa73fe08a3..6819b619b1ab 100644 --- a/testbed/tests/scenarios.go +++ b/testbed/tests/scenarios.go @@ -364,8 +364,6 @@ func ScenarioTestTraceNoBackend10kSPS( rss, _, err := tc.AgentMemoryInfo() require.NoError(t, err) assert.Less(t, configuration.ExpectedMinFinalRAM, rss) - tc.StopLoad() - tc.StopAgent() } func ScenarioSendingQueuesFull(