diff --git a/integration/tsic/tsic.go b/integration/tsic/tsic.go index 7787860b1c7..d668026b87b 100644 --- a/integration/tsic/tsic.go +++ b/integration/tsic/tsic.go @@ -562,7 +562,7 @@ func (t *TailscaleInContainer) Netmap() (*netmap.NetworkMap, error) { // watch-ipn will only give an update if something is happening, // since we send keep alives, the worst case for this should be // 1 minute, but set a slightly more conservative time. - ctx, _ := context.WithTimeout(context.Background(), 2*time.Minute) + ctx, _ := context.WithTimeout(context.Background(), 5*time.Minute) notify, err := t.watchIPN(ctx) if err != nil { @@ -591,7 +591,12 @@ func (t *TailscaleInContainer) watchIPN(ctx context.Context) (*ipn.Notify, error go func() { _, _ = t.container.Exec( - []string{"tailscale", "debug", "watch-ipn"}, + // TODO(kradalby): There are no way to stop this call in go since its + // a long running go func, let it timeout itself. + // In the future, look into picking apart the dockertest exec and + // see if there is a good way to cancel. + // Or maybe send equivalent of ctrl+c to stdin? + []string{"timeout", "180s", "tailscale", "debug", "watch-ipn"}, dockertest.ExecOptions{ // The interesting output is sent to stdout, so ignore stderr. StdOut: pw, @@ -630,7 +635,6 @@ func (t *TailscaleInContainer) watchIPN(ctx context.Context) (*ipn.Notify, error } return result.notify, nil - } } diff --git a/integration/utils.go b/integration/utils.go index f38fc38b538..d559a8a8cfb 100644 --- a/integration/utils.go +++ b/integration/utils.go @@ -140,7 +140,7 @@ func assertClientsState(t *testing.T, clients []TailscaleClient) { }() } - wg.Done() + wg.Wait() } // assertValidNetmap asserts that the netmap of a client has all