Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait up to 1s for additional attach data
The Kubernetes e2e test flakes because of a token cancellation race between stdin and attach read: ``` [FAIL] [sig-cli] Kubectl client Simple pod [It] should support inline execution and attach … << Timeline [FAILED] Expected <string>: read:stdin closed to contain substring <string>: read:value In [It] at: test/e2e/kubectl/kubectl.go:764 @ 01/04/23 15:09:48.618 ``` The issue is that we cancel the token immediately which stops reading from attach. But the container command `echo -n read: && cat && echo 'stdin closed'` within the test provides additional data, which gets no time to be delivered. We now drain stdin accordingly and wait for all data to be passed down to the receiver. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
- Loading branch information