Skip to content

Commit 18cacdc

Browse files
author
Dylan Terry
committed
Make sure to assign the timeout on the syncer so the backup doesn't fail
1 parent a8bcf4c commit 18cacdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

replication/backup_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/go-mysql-org/go-mysql/mysql"
1313
)
1414

15+
// TestStartBackupEndInGivenTime tests the backup process completes within a given time.
1516
func (t *testSyncerSuite) TestStartBackupEndInGivenTime() {
1617
t.setupTest(mysql.MySQLFlavor)
1718

@@ -95,6 +96,8 @@ func testBackup(t *testSyncerSuite, isSynchronous bool) {
9596
ctx, cancel := context.WithTimeout(context.Background(), failTimeout)
9697
defer cancel()
9798

99+
t.b.ctx = ctx
100+
98101
// Wait for the backup to complete or timeout
99102
select {
100103
case <-done:

0 commit comments

Comments
 (0)