Use error variable consistently

This commit is contained in:
A.J. Beamon 2023-02-23 11:27:53 -08:00
parent a76af5c696
commit 9e9a31c0f1
1 changed files with 6 additions and 6 deletions

View File

@ -176,9 +176,9 @@ struct MetaclusterManagementWorkload : TestWorkload {
state Error registerError = e;
if (registerError.code() == error_code_cluster_removed ||
registerError.code() == error_code_cluster_not_empty) {
if (e.code() == error_code_cluster_removed) {
if (registerError.code() == error_code_cluster_removed) {
ASSERT(retried);
} else if (e.code() == error_code_cluster_not_empty) {
} else if (registerError.code() == error_code_cluster_not_empty) {
ASSERT(dataDb->detached);
}
@ -430,15 +430,15 @@ struct MetaclusterManagementWorkload : TestWorkload {
break;
} catch (Error& e) {
state Error error = e;
if (e.code() == error_code_conflicting_restore) {
if (error.code() == error_code_conflicting_restore) {
ASSERT(retried);
CODE_PROBE(true, "MetaclusterManagementWorkload: timed out restore conflicts with retried restore");
continue;
} else if (e.code() == error_code_cluster_not_found) {
} else if (error.code() == error_code_cluster_not_found) {
ASSERT(!dataDb->registered);
return Void();
} else if (e.code() == error_code_tenant_already_exists ||
e.code() == error_code_invalid_tenant_configuration) {
} else if (error.code() == error_code_tenant_already_exists ||
error.code() == error_code_invalid_tenant_configuration) {
ASSERT(dataDb->detached);
wait(removeFailedRestoredCluster(self, clusterName));
wait(resolveCollisions(self, clusterName, dataDb));