From fae706fe162113200b580169e561335a84fc37da Mon Sep 17 00:00:00 2001 From: xiaojingchen Date: Fri, 31 May 2019 18:40:20 +0800 Subject: [PATCH] fix dt bug --- tests/cmd/e2e/main.go | 1 + tests/cmd/stability/main.go | 1 + tests/util.go | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/cmd/e2e/main.go b/tests/cmd/e2e/main.go index 0d36e855b6..3dfd76c3cf 100644 --- a/tests/cmd/e2e/main.go +++ b/tests/cmd/e2e/main.go @@ -322,6 +322,7 @@ func main() { restoreClusterInfo.ClusterName = restoreClusterInfo.ClusterName + "-other" restoreClusterInfo.InitSecretName = fmt.Sprintf("%s-set-secret", restoreClusterInfo.ClusterName) restoreClusterInfo.BackupSecretName = fmt.Sprintf("%s-backup-secret", restoreClusterInfo.ClusterName) + restoreClusterInfo.SubValues = tests.GetAffinityConfigOrDie(restoreClusterInfo.ClusterName, restoreClusterInfo.Namespace) if err = oa.CleanTidbCluster(restoreClusterInfo); err != nil { glog.Fatal(err) diff --git a/tests/cmd/stability/main.go b/tests/cmd/stability/main.go index 25411a87ee..8b39a184ca 100644 --- a/tests/cmd/stability/main.go +++ b/tests/cmd/stability/main.go @@ -153,6 +153,7 @@ func main() { clusterRestoreTo := &tests.TidbClusterConfig{} copier.Copy(clusterRestoreTo, clusterBackupFrom) clusterRestoreTo.ClusterName = "cluster-restore" + clusterRestoreTo.SubValues = tests.GetAffinityConfigOrDie(clusterRestoreTo.ClusterName, clusterRestoreTo.Namespace) onePDCluster := &tests.TidbClusterConfig{} copier.Copy(onePDCluster, cluster1) diff --git a/tests/util.go b/tests/util.go index 0d430fdf70..b068eea6fc 100644 --- a/tests/util.go +++ b/tests/util.go @@ -111,17 +111,17 @@ func GetAffinityConfigOrDie(clusterName, namespace string) string { } pdbuff := new(bytes.Buffer) - err = temp.Execute(pdbuff, &AffinityInfo{ClusterName: clusterName, Kind: "pd", Weight: 10, Namespace: namespace}) + err = temp.Execute(pdbuff, &AffinityInfo{ClusterName: clusterName, Kind: "pd", Weight: 50, Namespace: namespace}) if err != nil { slack.NotifyAndPanic(err) } tikvbuff := new(bytes.Buffer) - err = temp.Execute(tikvbuff, &AffinityInfo{ClusterName: clusterName, Kind: "tikv", Weight: 10, Namespace: namespace}) + err = temp.Execute(tikvbuff, &AffinityInfo{ClusterName: clusterName, Kind: "tikv", Weight: 50, Namespace: namespace}) if err != nil { slack.NotifyAndPanic(err) } tidbbuff := new(bytes.Buffer) - err = temp.Execute(tidbbuff, &AffinityInfo{ClusterName: clusterName, Kind: "tidb", Weight: 10, Namespace: namespace}) + err = temp.Execute(tidbbuff, &AffinityInfo{ClusterName: clusterName, Kind: "tidb", Weight: 50, Namespace: namespace}) if err != nil { slack.NotifyAndPanic(err) }