Skip to content

Commit

Permalink
[#25745] YSQL: Fix YsqlMajorUpgradeDdlBlockingTest.TestDdlsDuringUpgrade
Browse files Browse the repository at this point in the history
Summary:
Test failure was due to f976939/D41420, since we now get a different error message based on the state of the cleanup.

Fixes #25745
Jira: DB-15026

Test Plan: YsqlMajorUpgradeDdlBlockingTest.TestDdlsDuringUpgrade

Reviewers: telgersma

Reviewed By: telgersma

Subscribers: sergei, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D41473
  • Loading branch information
hari90 committed Jan 28, 2025
1 parent ed9409a commit 96a208c
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,19 @@ class YsqlMajorUpgradeDdlBlockingTest : public Pg15UpgradeTestBase {
if (!error_expected) {
RETURN_NOT_OK(status);
} else {
SCHECK(
!status.ok() &&
status.message().ToString().find(kExpectedDdlError) != std::string::npos,
IllegalState, "Unexpected status: ", status.ToString());
if (upgrade_state_ == UpgradeState::kAfterUpgrade) {
// Depending on the cleanup state we may get different errors after the upgrade.
SCHECK(
!status.ok() &&
(status.message().ToString().find(kExpectedDdlError) != std::string::npos ||
status.message().ToString().find("unknown_table_name") != std::string::npos),
IllegalState, "Unexpected status: ", status.ToString());
} else {
SCHECK(
!status.ok() &&
status.message().ToString().find(kExpectedDdlError) != std::string::npos,
IllegalState, "Unexpected status: ", status.ToString());
}
}
}
return Status::OK();
Expand Down

0 comments on commit 96a208c

Please sign in to comment.