add try-catch block that ignores backup_unneeded

This commit is contained in:
Jon Fu 2020-10-12 15:31:22 -04:00
parent b01cae5464
commit 53d7d8ba63
1 changed files with 7 additions and 1 deletions

View File

@ -96,7 +96,13 @@ struct IncrementalBackupWorkload : TestWorkload {
}
}
if (self->stopBackup) {
wait(self->backupAgent.discontinueBackup(cx, self->tag));
try {
wait(self->backupAgent.discontinueBackup(cx, self->tag));
} catch (Error& e) {
if (e.code() != error_code_backup_unneeded) {
throw;
}
}
}
return true;
}