Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Fix some of the load tests #33975

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions testbed/tests/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func ScenarioTestTraceNoBackend10kSPS(

t.Cleanup(tc.Stop)

tc.StartBackend()
tc.StartAgent()
tc.StartLoad(options)

Expand Down Expand Up @@ -394,16 +395,17 @@ func ScenarioSendingQueuesFull(
receiver,
agentProc,
&testbed.LogPresentValidator{
LogBody: "sending_queue is full",
LogBody: "sending queue is full",
Present: true,
},
resultsSummary,
testbed.WithResourceLimits(resourceSpec),
testbed.WithDecisionFunc(func() error { return testbed.GenerateNonPernamentErrorUntil(dataChannel) }),
)

t.Cleanup(tc.Stop)

tc.MockBackend.EnableRecording()
defer tc.Stop()

tc.StartBackend()
tc.StartAgent()
Expand All @@ -412,18 +414,18 @@ 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
}
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 {
Expand Down Expand Up @@ -475,7 +477,7 @@ func ScenarioSendingQueuesNotFull(
receiver,
agentProc,
&testbed.LogPresentValidator{
LogBody: "sending_queue is full",
LogBody: "sending queue is full",
Present: false,
},
resultsSummary,
Expand Down