Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run/tests: fix flaky RunAttachTermination test
During an attached `docker run`, the CLI starts capturing signals so that they can be forwarded to the container. The CLI stops capturing signals after container is no longer running/it's streams are closed. This test was running into a race condition between signalling the running command with a SIGINT and closing the mock container's streams – If the signal syscall takes too long and the CLI realizes the streams are closed and stops the signal handling, the interrupt isn't captured and instead interrupts the test :') Fix this by only closing the stream after the ContainerKill call was made, which means the signal has already been captured. Signed-off-by: Laura Brehm <[email protected]>
- Loading branch information