From c1ab521a28d1347b0f676f00e869ae4e58e424e2 Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Wed, 8 Jan 2025 10:16:50 +0000 Subject: [PATCH] Fix mixVersion test case: ensure a snapshot to be sent out Signed-off-by: Benjamin Wang --- server/etcdserver/server.go | 2 +- tests/e2e/etcd_mix_versions_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/etcdserver/server.go b/server/etcdserver/server.go index 2655d47d670..d60c8da64fc 100644 --- a/server/etcdserver/server.go +++ b/server/etcdserver/server.go @@ -623,7 +623,7 @@ func NewServer(cfg config.ServerConfig) (srv *EtcdServer, err error) { srv.kv = mvcc.New(srv.Logger(), srv.be, srv.lessor, mvccStoreConfig) kvindex := ci.ConsistentIndex() - srv.lg.Debug("restore consistentIndex", zap.Uint64("index", kvindex)) + srv.lg.Info("restore consistentIndex", zap.Uint64("index", kvindex)) if beExist { // TODO: remove kvindex != 0 checking when we do not expect users to upgrade diff --git a/tests/e2e/etcd_mix_versions_test.go b/tests/e2e/etcd_mix_versions_test.go index e66c73b913d..cb41cfe5ce5 100644 --- a/tests/e2e/etcd_mix_versions_test.go +++ b/tests/e2e/etcd_mix_versions_test.go @@ -149,9 +149,9 @@ func mixVersionsSnapshotTestByMockPartition(t *testing.T, cfg e2e.EtcdProcessClu require.NoError(t, err) time.Sleep(2 * time.Second) - t.Log("Writing 20 keys to the cluster (more than SnapshotCount entries to trigger at least a snapshot)") + t.Log("Writing 30 keys to the cluster (more than SnapshotCount entries to trigger at least a snapshot)") etcdctl := epc.Procs[0].Etcdctl(e2e.ClientNonTLS, false, false) - writeKVs(t, etcdctl, 0, 20) + writeKVs(t, etcdctl, 0, 30) t.Log("Verify logs to check leader has saved snapshot") leaderEPC := epc.Procs[epc.WaitLeader(t)]