Browse Source

server: wait for entries to be committed in TestClusterConfigReload

Yicheng Qin 11 years ago
parent
commit
b1426e2635
1 changed files with 2 additions and 0 deletions
  1. 2 0
      etcd/etcd_functional_test.go

+ 2 - 0
etcd/etcd_functional_test.go

@@ -173,6 +173,8 @@ func TestClusterConfigReload(t *testing.T) {
 		}
 
 		lead, _ = waitLeader(es)
+		// wait for msgAppResp to commit all entries
+		time.Sleep(2 * defaultHeartbeat * es[lead].tickDuration)
 		if g := es[lead].p.clusterConfig(); !reflect.DeepEqual(g, conf) {
 			t.Errorf("#%d: clusterConfig = %+v, want %+v", i, g, conf)
 		}