From a61b35f5a3831456d7daecda6dab1d36ba67bf7a Mon Sep 17 00:00:00 2001 From: Cassondra Foesch Date: Mon, 31 Jan 2022 21:25:18 +0000 Subject: [PATCH] remove racing stdout --- server_integration_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server_integration_test.go b/server_integration_test.go index a185dd9..407d38a 100644 --- a/server_integration_test.go +++ b/server_integration_test.go @@ -501,17 +501,15 @@ func runSftpClient(t *testing.T, script string, path string, host string, port i return "", err } - output := stdout.String() - if err := cmd.Wait(); err != nil { - return output, &execError{ + return stdout.String(), &execError{ path: cmd.Path, stderr: stderr.String(), err: err, } } - return output, nil + return stdout.String(), nil } // assert.Eventually seems to have a data rate on macOS with go 1.14 so replace it with this simpler function