Merge pull request #42155 from Snorch/integration-cli-fix-race-in-TestServiceLogsFollow

integration-cli: Fix race in TestServiceLogsFollow test case
This commit is contained in:
Brian Goff 2022-06-30 11:39:32 -07:00 committed by GitHub
commit 54fc2812e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -170,6 +170,8 @@ func (s *DockerSwarmSuite) TestServiceLogsFollow(c *testing.T) {
args := []string{"service", "logs", "-f", name}
cmd := exec.Command(dockerBinary, d.PrependHostArg(args)...)
r, w := io.Pipe()
defer r.Close()
defer w.Close()
cmd.Stdout = w
cmd.Stderr = w
assert.NilError(c, cmd.Start())