Skip to content

Fix flaky k8s TestProcessLogs

Arran Walker requested to merge ajwalker/fix-flaky-k8s-log-test into main

What does this MR do?

Fixes the flaky TestProcessLogs.

Why was this MR needed?

This test wasn't waiting for an expected log line.

We now wait for it to be written for at least 3 seconds before declaring it as a fail.

What's the best way to test this MR?

Before the change, run:

go test --cpu 2 -run TestProcessLogs/Reattach_failure_with_custom_error ./executors/kubernetes/ -count 1000 -race

You'll likely trigger the error.

Do the same after the test: should all be good.

What are the relevant issue numbers?

Merge request reports