Skip to content

Commit

Permalink
Give windows extra time before sending input
Browse files Browse the repository at this point in the history
  • Loading branch information
Naatan committed Aug 31, 2023
1 parent fce6b32 commit 92cc3be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/testhelpers/e2e/spawn.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ func (s *SpawnedCmd) ExpectInput(opts ...termtest.SetExpectOpt) error {
return s.Expect(expect, opts...)
}

func (s *SpawnedCmd) SendLine(value string) error {
if runtime.GOOS == "windows" {
// Work around race condition - on Windows it appears more likely to happen
// https://activestatef.atlassian.net/browse/DX-2171
time.Sleep(100 * time.Second)
}
return s.TermTest.SendLine(value)
}

func (s *SpawnedCmd) SendEnter() error {
return s.SendLine("")
}
Expand Down

0 comments on commit 92cc3be

Please sign in to comment.