From 39f8804ea1e31f38104370655a518df54b9b3c16 Mon Sep 17 00:00:00 2001 From: Chunzhu Li Date: Mon, 13 Feb 2023 11:02:17 +0800 Subject: [PATCH] resolve conflicts --- dumpling/export/dump_test.go | 71 ------------------------------------ 1 file changed, 71 deletions(-) diff --git a/dumpling/export/dump_test.go b/dumpling/export/dump_test.go index af58d69aaec86..7cbc52e341451 100644 --- a/dumpling/export/dump_test.go +++ b/dumpling/export/dump_test.go @@ -9,11 +9,7 @@ import ( "time" "github.com/DATA-DOG/go-sqlmock" -<<<<<<< HEAD -======= - "github.com/coreos/go-semver/semver" "github.com/go-sql-driver/mysql" ->>>>>>> 1746f02a1d (dumpling: fix cannot dump data bug when dumpling fails to check has tikv (#40977)) "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/tidb/br/pkg/version" @@ -230,72 +226,6 @@ func TestUnregisterMetrics(t *testing.T) { // should not panic require.Error(t, err) } -<<<<<<< HEAD -======= - -func TestSetDefaultSessionParams(t *testing.T) { - testCases := []struct { - si version.ServerInfo - sessionParams map[string]interface{} - expectedParams map[string]interface{} - }{ - { - si: version.ServerInfo{ - ServerType: version.ServerTypeTiDB, - HasTiKV: true, - ServerVersion: semver.New("6.1.0"), - }, - sessionParams: map[string]interface{}{ - "tidb_snapshot": "2020-01-01 00:00:00", - }, - expectedParams: map[string]interface{}{ - "tidb_snapshot": "2020-01-01 00:00:00", - }, - }, - { - si: version.ServerInfo{ - ServerType: version.ServerTypeTiDB, - HasTiKV: true, - ServerVersion: semver.New("6.2.0"), - }, - sessionParams: map[string]interface{}{ - "tidb_snapshot": "2020-01-01 00:00:00", - }, - expectedParams: map[string]interface{}{ - "tidb_enable_paging": "ON", - "tidb_snapshot": "2020-01-01 00:00:00", - }, - }, - { - si: version.ServerInfo{ - ServerType: version.ServerTypeTiDB, - HasTiKV: true, - ServerVersion: semver.New("6.2.0"), - }, - sessionParams: map[string]interface{}{ - "tidb_enable_paging": "OFF", - "tidb_snapshot": "2020-01-01 00:00:00", - }, - expectedParams: map[string]interface{}{ - "tidb_enable_paging": "OFF", - "tidb_snapshot": "2020-01-01 00:00:00", - }, - }, - { - si: version.ServerInfo{ - ServerType: version.ServerTypeMySQL, - ServerVersion: semver.New("8.0.32"), - }, - sessionParams: map[string]interface{}{}, - expectedParams: map[string]interface{}{}, - }, - } - - for _, testCase := range testCases { - setDefaultSessionParams(testCase.si, testCase.sessionParams) - require.Equal(t, testCase.expectedParams, testCase.sessionParams) - } -} func TestSetSessionParams(t *testing.T) { // case 1: fail to set tidb_snapshot, should return error with hint @@ -357,4 +287,3 @@ func TestSetSessionParams(t *testing.T) { err = setSessionParam(d) require.NoError(t, err) } ->>>>>>> 1746f02a1d (dumpling: fix cannot dump data bug when dumpling fails to check has tikv (#40977))