From 72f5bea981d65be6655edd3a1567a93976a5c4d5 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Wed, 30 Oct 2024 11:24:02 -0600 Subject: [PATCH] fix unit test Signed-off-by: Florent Poinsard --- go/vt/mysqlctl/backup_blackbox_race_test.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/go/vt/mysqlctl/backup_blackbox_race_test.go b/go/vt/mysqlctl/backup_blackbox_race_test.go index 5414ebc5fa6..f45e2b9ed8c 100644 --- a/go/vt/mysqlctl/backup_blackbox_race_test.go +++ b/go/vt/mysqlctl/backup_blackbox_race_test.go @@ -117,7 +117,7 @@ func TestExecuteBackupWithFailureOnLastFile(t *testing.T) { defer fakedb.Close() mysqld := mysqlctl.NewFakeMysqlDaemon(fakedb) defer mysqld.Close() - mysqld.ExpectedExecuteSuperQueryList = []string{"STOP REPLICA", "START REPLICA"} + mysqld.ExpectedExecuteSuperQueryList = []string{"STOP SLAVE", "START SLAVE"} // With this setup, 4 backup files will be created (0, 1, 2, 3). For the last file (3), we create // it in advance and remove all permission on the file so that the backup be.ExecuteBackup will not @@ -138,15 +138,14 @@ func TestExecuteBackupWithFailureOnLastFile(t *testing.T) { InnodbLogGroupHomeDir: path.Join(backupRoot, "log"), DataDir: path.Join(backupRoot, "datadir"), }, - Stats: backupstats.NewFakeStats(), - Concurrency: 4, - HookExtraEnv: map[string]string{}, - TopoServer: ts, - Keyspace: keyspace, - Shard: shard, - MysqlShutdownTimeout: mysqlShutdownTimeout, + Stats: backupstats.NewFakeStats(), + Concurrency: 4, + HookExtraEnv: map[string]string{}, + TopoServer: ts, + Keyspace: keyspace, + Shard: shard, }, bh) require.ErrorContains(t, err, "cannot add file: 3") - require.Equal(t, mysqlctl.BackupUnusable, backupResult) + require.False(t, backupResult) }