Browse Source

Merge pull request #73 from philips/fix-tests

fix(test): add sleep in createCluster
Brandon Philips 12 years ago
parent
commit
1e62e92969
1 changed files with 8 additions and 0 deletions
  1. 8 0
      test.go

+ 8 - 0
test.go

@@ -74,6 +74,14 @@ func createCluster(size int, procAttr *os.ProcAttr) ([][]string, []*os.Process,
 		if err != nil {
 		if err != nil {
 			return nil, nil, err
 			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
 	return argGroup, etcds, nil