Skip to content

Fix flaky interactive terminal test

Arran Walker requested to merge ajwalker/fix-flakey-interactive-terminal-test into main

What does this MR do?

The build is attached to a terminal session, but there's no way of checking whether this has occurred.

This exposes a method that was previous private, so that we can check whether the build has attached itself externally. This allows tests to poll for such a case and then proceed with testing.

Why was this MR needed?

Fixes a flaky test.

What's the best way to test this MR?

It was fairly easy to trigger this error before by running the test multiple times.

go test -run="TestInteractiveTerminal/bash" -v ./executors/shell -count=5

What are the relevant issue numbers?

Closes #27579 (closed)

#30835 (closed)

Edited by Arran Walker

Merge request reports