Selaa lähdekoodia

integration: fix TestIssue2904 when multiple cores

Do not wait for the cluster view of removed member to match with
expected view, since removed member does not apply entries after it is
removed.
Yicheng Qin 10 vuotta sitten
vanhempi
commit
796d99c390
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      integration/cluster_test.go

+ 4 - 2
integration/cluster_test.go

@@ -298,9 +298,11 @@ func TestIssue2904(t *testing.T) {
 	// and apply it.
 	<-c.Members[1].s.StopNotify()
 
+	// terminate removed member
+	c.Members[1].Terminate(t)
+	c.Members = c.Members[:1]
 	// wait member to be removed.
-	httpmembs := c.HTTPMembers()
-	c.waitMembersMatch(t, httpmembs[:1])
+	c.waitMembersMatch(t, c.HTTPMembers())
 }
 
 // clusterMustProgress ensures that cluster can make progress. It creates