Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4651 from hashicorp/ceb-ssh-flake-fix
Browse files Browse the repository at this point in the history
Fix flakey ceb/ssh test
  • Loading branch information
jgwhite committed May 3, 2023
2 parents ba4d3da + c8fd9f5 commit a875857
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/ceb/ssh/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/gliderlabs/ssh"
"github.com/hashicorp/go-hclog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
gossh "golang.org/x/crypto/ssh"
)
Expand Down Expand Up @@ -93,6 +92,10 @@ func TestServer(t *testing.T) {

err = sess.Run("sh -c 'echo hello'")
require.NoError(t, err)

assert.Equal(t, "hello\n", buf.String())
require.Eventually(
t,
func() bool { return buf.String() == "hello\n" },
time.Second,
10*time.Millisecond,
)
}

0 comments on commit a875857

Please sign in to comment.