mirror of https://github.com/status-im/consul.git
command: make TestExecCommandRun_CrossDC more resilient
Wait after WAN join that both members see each other.
This commit is contained in:
parent
7381a05d8d
commit
406dc2ead8
|
@ -62,13 +62,19 @@ func TestExecCommandRun_CrossDC(t *testing.T) {
|
|||
|
||||
// Join over the WAN
|
||||
wanAddr := fmt.Sprintf("%s:%d", a1.Config.BindAddr, a1.Config.Ports.SerfWan)
|
||||
n, err := a2.JoinWAN([]string{wanAddr})
|
||||
_, err := a2.JoinWAN([]string{wanAddr})
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
if n != 1 {
|
||||
t.Fatalf("bad %d", n)
|
||||
}
|
||||
|
||||
retry.Run(t, func(r *retry.R) {
|
||||
if got, want := len(a1.WANMembers()), 2; got != want {
|
||||
r.Fatalf("got %d WAN members on a1 want %d", got, want)
|
||||
}
|
||||
if got, want := len(a2.WANMembers()), 2; got != want {
|
||||
r.Fatalf("got %d WAN members on a2 want %d", got, want)
|
||||
}
|
||||
})
|
||||
|
||||
ui, c := testExecCommand(t)
|
||||
args := []string{"-http-addr=" + a1.HTTPAddr(), "-wait=500ms", "-datacenter=dc2", "uptime"}
|
||||
|
|
Loading…
Reference in New Issue