Skip to content

Fix flakiness of the TestAttachReconnectReadLogs test

Romuald Atchadé requested to merge flaky_test_attach_reconnect_read_logs into main

What does this MR do?

Fix the flakiness of the TestAttachReconnectReadLogs test

Why was this MR needed?

It brings reliability to the TestAttachReconnectReadLogs test

What's the best way to test this MR?

How to test the MR

Run the following command :

go test -count 100 -run TestAttachReconnectReadLogs -v ./executors/kubernetes/

The tests must pass.

Note: The same test may passes on the master branch and it could be difficult to reproduce it.

Test result

Screen_Shot_2021-06-15_at_10.28.49_AM

Tests benchmarks

master:

$ go test -count 100 -run TestAttachReconnectReadLogs -v ./executors/kubernetes/
ok      gitlab.com/gitlab-org/gitlab-runner/executors/kubernetes        0.438s

flaky_test_attach_reconnect_read_logs:

$ go test -count 100 -run TestAttachReconnectReadLogs -v ./executors/kubernetes/
ok      gitlab.com/gitlab-org/gitlab-runner/executors/kubernetes        21.619s

That makes it clearer that the backoff period is now being respected.

What are the relevant issue numbers?

closes: #27924 (closed)

Edited by Romuald Atchadé

Merge request reports