Returns a single test node with replica parameter of 2.
()
| 18 | |
| 19 | // Returns a single test node with replica parameter of 2. |
| 20 | func defaultTestNode() (*Node, error) { |
| 21 | n, err := Create(buildTestConfig(2, 0, 0)) |
| 22 | if err != nil { |
| 23 | return nil, err |
| 24 | } |
| 25 | |
| 26 | // Allow the node to setup. |
| 27 | n.Start() |
| 28 | time.Sleep(10 * time.Millisecond) |
| 29 | |
| 30 | return n, nil |
| 31 | } |
| 32 | |
| 33 | // Returns a list of n Node's that have joined each other. |
| 34 | func connectedTestNodes(n int, replicas int) ([]*Node, error) { |