diff --git a/tests/cmd/e2e/main.go b/tests/cmd/e2e/main.go index 947782ad61..6b926539a4 100644 --- a/tests/cmd/e2e/main.go +++ b/tests/cmd/e2e/main.go @@ -328,6 +328,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 ccf50761f1..dd8856b6f0 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) }