From 919bae661e2d5aa41089fdc974c36d1542e308ef Mon Sep 17 00:00:00 2001 From: Aylei Date: Wed, 17 Apr 2019 16:28:33 +0800 Subject: [PATCH] Address review comments Signed-off-by: Aylei --- tests/backup/backupcase.go | 2 +- tests/cmd/stability/main.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/backup/backupcase.go b/tests/backup/backupcase.go index e9e62eb2bf..9c9991ac31 100644 --- a/tests/backup/backupcase.go +++ b/tests/backup/backupcase.go @@ -38,6 +38,7 @@ func NewBackupCase(operator tests.OperatorActions, srcCluster *tests.TidbCluster func (bc *BackupCase) Run() error { // pause write pressure during backup + bc.operator.StopInsertDataTo(bc.srcCluster) defer func() { go func() { if err := bc.operator.BeginInsertDataTo(bc.srcCluster); err != nil { @@ -45,7 +46,6 @@ func (bc *BackupCase) Run() error { } }() }() - bc.operator.StopInsertDataTo(bc.srcCluster) err := bc.operator.DeployAdHocBackup(bc.srcCluster) if err != nil { diff --git a/tests/cmd/stability/main.go b/tests/cmd/stability/main.go index 7bca840234..c91ba20e68 100644 --- a/tests/cmd/stability/main.go +++ b/tests/cmd/stability/main.go @@ -156,12 +156,10 @@ func main() { oa.CheckTidbClusterStatusOrDie(cluster1) oa.CheckTidbClusterStatusOrDie(cluster2) - defer func() { - oa.StopInsertDataTo(cluster1) - oa.StopInsertDataTo(cluster2) - }() go oa.BeginInsertDataToOrDie(cluster1) + defer oa.StopInsertDataTo(cluster1) go oa.BeginInsertDataToOrDie(cluster2) + defer oa.StopInsertDataTo(cluster2) // TODO add DDL //var workloads []workload.Workload