server: wait for entries to be committed in TestClusterConfigReload

This commit is contained in:
Yicheng Qin 2014-08-04 15:57:12 -07:00
parent 659eb5fd2a
commit b1426e2635

View File

@ -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)
}