Skip to content

Commit

Permalink
feat: add test utils for region migration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Dec 4, 2023
1 parent 965d869 commit 50bbecb
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/meta-srv/src/procedure/region_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub(crate) mod migration_abort;
pub(crate) mod migration_end;
pub(crate) mod migration_start;
pub(crate) mod open_candidate_region;
// TODO(weny): remove it.
#[allow(unused)]
#[cfg(test)]
pub(crate) mod test_util;
pub(crate) mod update_metadata;
Expand Down Expand Up @@ -263,7 +265,7 @@ impl Context {

#[async_trait::async_trait]
#[typetag::serde(tag = "region_migration_state")]
trait State: Sync + Send + Debug {
pub(crate) trait State: Sync + Send + Debug {
/// Yields the next [State] and [Status].
async fn next(&mut self, ctx: &mut Context) -> Result<(Box<dyn State>, Status)>;

Expand Down
Loading

0 comments on commit 50bbecb

Please sign in to comment.