Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
knz committed Apr 5, 2021
1 parent 239fc27 commit d3596d6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/cli/demo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ func TestTransientClusterSimulateLatencies(t *testing.T) {
}
}()

// At the end of the test, we need to wait for the goroutines
// created by pending HTTP connections to terminate after realizing
// that the server they are connecting to is being shut down.
var maxRoundTripLatency time.Duration
for _, latencyMS := range regionRoundTripLatencies {
if d := time.Duration(latencyMS) * time.Millisecond; d > maxRoundTripLatency {
maxRoundTripLatency = d
}
}
defer time.Sleep(maxRoundTripLatency)

ctx := context.Background()

// Setup the transient cluster.
Expand Down

0 comments on commit d3596d6

Please sign in to comment.