Skip to content

Commit

Permalink
test: add tests for downgrade_region_with_retry
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Sep 11, 2024
1 parent 91ed680 commit 438298f
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ mod tests {

assert_matches!(err, Error::PusherNotFound { .. });
assert!(!err.is_retryable());
let err = state
.downgrade_region_with_retry(&mut ctx)
.await
.unwrap_err();
assert_matches!(err, Error::PusherNotFound { .. });
assert!(!err.is_retryable());
}

#[tokio::test]
Expand Down Expand Up @@ -316,6 +322,13 @@ mod tests {

assert_matches!(err, Error::ExceededDeadline { .. });
assert!(!err.is_retryable());

let err = state
.downgrade_region_with_retry(&mut ctx)
.await
.unwrap_err();
assert_matches!(err, Error::ExceededDeadline { .. });
assert!(!err.is_retryable());
}

#[tokio::test]
Expand Down

0 comments on commit 438298f

Please sign in to comment.