sweet/benchmarks/cockroachdb: fix ping retry
This benchmark waits for the server to come up by running a "ping"
command in a loop. However, it only calls "CombinedOutput" in the
loop, and according to the exec.Cmd documentation, you're only
supposed to call it once. Fix this by reconstructing the Cmd on every
iteration.
While we're here, we also put a timeout on the ping command in case it
freezes. I've had this happen a few times during experiments.
Change-Id: Ic846da2b4bcece2fbb2af68843362398ac609c05
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/619718
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
1 file changed