Skip to content

Interactive terminal: Wait for terminal to be set

Arran Walker requested to merge ajwalker/wait-interactive-terminal into main

What does this MR do?

If an incoming connection arrives before the build terminal has connected, we now wait for it.

Why was this MR needed?

Fixes a reported issue regarding the web terminal connecting too early and receiving an error.

What's the best way to test this MR?

The TestInteractiveTerminal used to be really flaky. Which I then fixed, but waiting, but that only occurred during the tests.

I've now removed the wait from the tests, and we rely detecting the build terminal connecting in the same way as we would in a real connection scenario.

There was also previously a sleep in the tests (likely an attempt to make this less flaky before I fixed it), which is now also removed.

go test -run TestInteractiveTerminal -tags integration ./executors/shell -count 10

What are the relevant issue numbers?

close #30877 (closed)

Edited by Romuald Atchadé

Merge request reports