From e0b87719503dfaf94d87162a79d919776240a9f5 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Thu, 8 Aug 2013 16:42:34 -0700 Subject: [PATCH] fix(test): add sleep in createCluster The problem is that if the master isn't up when the children start then the children have to retry. This retry can take upwards of 15 seconds which slows tests way down and some of them fail. --- test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test.go b/test.go index a850c691c..3f06c4f57 100644 --- a/test.go +++ b/test.go @@ -74,6 +74,14 @@ func createCluster(size int, procAttr *os.ProcAttr) ([][]string, []*os.Process, if err != nil { return nil, nil, err } + + // TODOBP: Change this sleep to wait until the master is up. + // The problem is that if the master isn't up then the children + // have to retry. This retry can take upwards of 15 seconds + // which slows tests way down and some of them fail. + if i == 0 { + time.Sleep(time.Second) + } } return argGroup, etcds, nil