Skip to content

Commit

Permalink
Remove flakiness in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Nov 22, 2024
1 parent ada41b7 commit 3875fd1
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions go/vt/mysqlctl/backup_blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,21 +677,11 @@ func TestExecuteBackupFailToWriteEachFileOnlyOnce(t *testing.T) {
"Backing up file: test2/0.ibd (attempt 1/2)",
"Backing up file: test2/1.ibd (attempt 1/2)",

"Failed backing up \"test1/0.ibd\" (attempt 1/2)",
"Failed backing up \"test1/1.ibd\" (attempt 1/2)",
"Failed backing up \"test2/0.ibd\" (attempt 1/2)",
"Failed backing up \"test2/1.ibd\" (attempt 1/2)",

"Backing up file: test1/0.ibd (attempt 2/2)",
"Backing up file: test1/1.ibd (attempt 2/2)",
"Backing up file: test2/0.ibd (attempt 2/2)",
"Backing up file: test2/1.ibd (attempt 2/2)",

"Completed backing up \"test1/0.ibd\" (attempt 2/2)",
"Completed backing up \"test1/1.ibd\" (attempt 2/2)",
"Completed backing up \"test2/0.ibd\" (attempt 2/2)",
"Completed backing up \"test2/1.ibd\" (attempt 2/2)",

"Backing up file MANIFEST (attempt 1/2)",
"Failed backing up MANIFEST (attempt 1/2)",
"Backing up file MANIFEST (attempt 2/2)",
Expand Down Expand Up @@ -744,8 +734,8 @@ func TestExecuteBackupFailToWriteFileEachTwice(t *testing.T) {
}, bh)

expectedLogs := []string{
"Failed backing up \"test1/0.ibd\" (attempt 1/2)",
"Failed backing up \"test1/0.ibd\" (attempt 2/2)",
"Backing up file: test1/0.ibd (attempt 1/2)",
"Backing up file: test1/0.ibd (attempt 2/2)",
}

assertLogs(t, expectedLogs, logger)
Expand Down

0 comments on commit 3875fd1

Please sign in to comment.