Merge pull request #92016 from BenTheElder/sleep-moar

up sleep time in racy test
This commit is contained in:
Kubernetes Prow Robot 2020-06-10 22:44:21 -07:00 committed by GitHub
commit a8f1ecc76b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -564,9 +564,9 @@ var _ = SIGDescribe("Kubectl client", func() {
// There is a race on this scenario described in #73099
// It fails if we are not able to attach before the container prints
// "stdin closed", but hasn't exited yet.
// We wait 5 seconds before printing to give time to kubectl to attach
// We wait 10 seconds before printing to give time to kubectl to attach
// to the container, this does not solve the race though.
runOutput = framework.NewKubectlCommand(ns, fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image="+busyboxImage, "--restart=OnFailure", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "sleep 5; cat && echo 'stdin closed'").
runOutput = framework.NewKubectlCommand(ns, fmt.Sprintf("--namespace=%v", ns), "run", "run-test-2", "--image="+busyboxImage, "--restart=OnFailure", "--attach=true", "--leave-stdin-open=true", "--", "sh", "-c", "sleep 10; cat && echo 'stdin closed'").
WithStdinData("abcd1234").
ExecOrDie(ns)
gomega.Expect(runOutput).ToNot(gomega.ContainSubstring("abcd1234"))