|
|
|
@ -256,7 +256,7 @@ func Test_MultiNodeClusterBootstrap(t *testing.T) {
|
|
|
|
|
addr, _ := node1.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -264,7 +264,7 @@ func Test_MultiNodeClusterBootstrap(t *testing.T) {
|
|
|
|
|
addr, _ := node2.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -272,7 +272,7 @@ func Test_MultiNodeClusterBootstrap(t *testing.T) {
|
|
|
|
|
addr, _ := node3.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
wg.Wait()
|
|
|
|
@ -424,7 +424,7 @@ func Test_MultiNodeClusterBootstrapLaterJoin(t *testing.T) {
|
|
|
|
|
addr, _ := node1.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -432,7 +432,7 @@ func Test_MultiNodeClusterBootstrapLaterJoin(t *testing.T) {
|
|
|
|
|
addr, _ := node2.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -440,7 +440,7 @@ func Test_MultiNodeClusterBootstrapLaterJoin(t *testing.T) {
|
|
|
|
|
addr, _ := node3.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
wg.Wait()
|
|
|
|
@ -477,7 +477,7 @@ func Test_MultiNodeClusterBootstrapLaterJoin(t *testing.T) {
|
|
|
|
|
addr, _ := node4.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
if err := node4Bs.Boot(node4.ID, node4.RaftAddr, done, 10*time.Second); err != nil {
|
|
|
|
|
if err := node4Bs.Boot(node4.ID, node4.RaftAddr, cluster.Voter, done, 10*time.Second); err != nil {
|
|
|
|
|
t.Fatalf("node 4 failed to boot")
|
|
|
|
|
}
|
|
|
|
|
node4Leader, err := node4.WaitForLeader()
|
|
|
|
@ -525,7 +525,7 @@ func Test_MultiNodeClusterBootstrapLaterJoinTLS(t *testing.T) {
|
|
|
|
|
addr, _ := node1.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node1Bs.Boot(node1.ID, node1.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -533,7 +533,7 @@ func Test_MultiNodeClusterBootstrapLaterJoinTLS(t *testing.T) {
|
|
|
|
|
addr, _ := node2.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node2Bs.Boot(node2.ID, node2.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
go func() {
|
|
|
|
@ -541,7 +541,7 @@ func Test_MultiNodeClusterBootstrapLaterJoinTLS(t *testing.T) {
|
|
|
|
|
addr, _ := node3.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, done, 10*time.Second)
|
|
|
|
|
node3Bs.Boot(node3.ID, node3.RaftAddr, cluster.Voter, done, 10*time.Second)
|
|
|
|
|
wg.Done()
|
|
|
|
|
}()
|
|
|
|
|
wg.Wait()
|
|
|
|
@ -579,7 +579,7 @@ func Test_MultiNodeClusterBootstrapLaterJoinTLS(t *testing.T) {
|
|
|
|
|
addr, _ := node4.Store.LeaderAddr()
|
|
|
|
|
return addr != ""
|
|
|
|
|
}
|
|
|
|
|
if err := node4Bs.Boot(node4.ID, node4.RaftAddr, done, 10*time.Second); err != nil {
|
|
|
|
|
if err := node4Bs.Boot(node4.ID, node4.RaftAddr, cluster.Voter, done, 10*time.Second); err != nil {
|
|
|
|
|
t.Fatalf("node 4 failed to boot")
|
|
|
|
|
}
|
|
|
|
|
node4Leader, err := node4.WaitForLeader()
|
|
|
|
|