Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Apr 25, 2023
1 parent b159191 commit 1e62742
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ssh/ssh_gocrypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ type sshServer struct {
}

func (s *sshServer) run(c *gc.C, running chan<- struct{}) {
// Attempt to introduce a synchronization point so that we can
// be sure that the server is running before we try to connect.
go func() {
time.Sleep(testing.ShortWait)
select {
case running <- struct{}{}:
case <-time.After(testing.ShortWait):
c.Fatalf("timed out waiting to send start signal")
}
}()

netconn, err := s.listener.Accept()
c.Assert(err, jc.ErrorIsNil)
defer netconn.Close()
Expand Down

0 comments on commit 1e62742

Please sign in to comment.