From 4a7237e89eb72e071ca0b5b7fb70485c409fe00d Mon Sep 17 00:00:00 2001 From: vinllen Date: Mon, 12 Apr 2021 17:35:58 +0800 Subject: [PATCH] ignore duplicate key error when in full sync stage3. #579 --- executor/db_writer_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/executor/db_writer_test.go b/executor/db_writer_test.go index 94e323e1..cca32398 100644 --- a/executor/db_writer_test.go +++ b/executor/db_writer_test.go @@ -149,7 +149,7 @@ func TestSingleWriter(t *testing.T) { conn, err := utils.NewMongoConn(testMongoAddress, "primary", true, utils.ReadWriteConcernDefault, utils.ReadWriteConcernDefault, "") assert.Equal(t, nil, err, "should be equal") - writer := NewDbWriter(conn.Session, bson.M{}, false, 0) + writer := NewDbWriter(conn.Session, bson.M{}, false, 1) // drop database err = conn.Session.DB(testDb).DropDatabase() @@ -190,7 +190,6 @@ func TestSingleWriter(t *testing.T) { assert.Equal(t, true, result[0].(bson.M)["x"] == 10, "should be equal") } } - return // test upsert, dupInsert {