Skip to content

Commit

Permalink
Merge #31723
Browse files Browse the repository at this point in the history
31723: roachtest: use high connect timeout in election test r=petermattis a=tschottdorf

It's possible the default of 5s is simply too tight, but as an easy
indication for that we can see what total duration the test takes
assuming it gets plenty of time to connect.

Closes #31615.

Release note: None

Co-authored-by: Tobias Schottdorf <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Oct 23, 2018
2 parents d3f39a5 + 20776ed commit ff7c8c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cmd/roachtest/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ func registerElectionAfterRestart(r *registry) {
// this up are working (we trigger elections eagerly, but not so
// eagerly that multiple elections conflict with each other).
start = timeutil.Now()
buf, err := c.RunWithBuffer(ctx, t.l, c.Node(1), `./cockroach sql --insecure -e "
// Use a large CONNECT_TIMEOUT so that if the initial connection
// takes ages (perhaps due to some cli-internal query taking a
// very long time), we fail with the duration check below and
// not an opaque error from the cli.
buf, err := c.RunWithBuffer(ctx, t.l, c.Node(1), `COCKROACH_CONNECT_TIMEOUT=240 ./cockroach sql --insecure -e "
SET TRACING = on;
SELECT * FROM test.kv;
SET TRACING = off;
Expand Down

0 comments on commit ff7c8c9

Please sign in to comment.