Skip to content

Commit

Permalink
fix disaster tolerance of stability test (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojingchen authored and weekface committed Jun 4, 2019
1 parent 758c988 commit bc2298c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/cmd/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/cmd/stability/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit bc2298c

Please sign in to comment.