Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
796d99c390
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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