Skip to content

Commit

Permalink
refine some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil committed Dec 10, 2021
1 parent f7dd241 commit 082952f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions common/meta/api/src/meta_api_test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ impl MetaApiTestSuite {
tracing::debug!("get present database res: {:?}", res);
let res = res?;
assert_eq!(1, res.database_id, "db1 id is 1");
assert_eq!("db1".to_string(), res.db, "db1.db is db1");
assert_eq!("db1", res.db, "db1.db is db1");
}

tracing::info!("--- get nonexistent-db on follower, expect correct error");
Expand Down Expand Up @@ -527,9 +527,9 @@ impl MetaApiTestSuite {
let res = res?;
assert_eq!(2, res.len(), "database list len is 2");
assert_eq!(1, res[0].database_id, "db1 id is 1");
assert_eq!("db1".to_string(), res[0].db, "db1.name is db1");
assert_eq!("db1", res[0].db, "db1.name is db1");
assert_eq!(2, res[1].database_id, "db3 id is 2");
assert_eq!("db3".to_string(), res[1].db, "db3.name is db3");
assert_eq!("db3", res[1].db, "db3.name is db3");
}

Ok(())
Expand Down Expand Up @@ -585,15 +585,15 @@ impl MetaApiTestSuite {
let res = res?;
assert_eq!(2, res.len(), "table list len is 2");
assert_eq!(1, res[0].ident.table_id, "tb1 id is 1");
assert_eq!("tb1".to_string(), res[0].name, "tb1.name is tb1");
assert_eq!("tb1", res[0].name, "tb1.name is tb1");
assert_eq!(2, res[1].ident.table_id, "tb2 id is 2");
assert_eq!("tb2".to_string(), res[1].name, "tb2.name is tb2");
assert_eq!("tb2", res[1].name, "tb2.name is tb2");
}

Ok(())
}

pub async fn table_create_get_drop_leader_follower<MT: MetaApi>(
pub async fn table_get_leader_follower<MT: MetaApi>(
&self,
leader: &MT,
follower: &MT,
Expand Down Expand Up @@ -641,7 +641,7 @@ impl MetaApiTestSuite {
tracing::debug!("get present table res: {:?}", res);
let res = res?;
assert_eq!(1, res.ident.table_id, "tb1 id is 1");
assert_eq!("tb1".to_string(), res.name, "tb1.name is tb1");
assert_eq!("tb1", res.name, "tb1.name is tb1");
}

tracing::info!("--- get nonexistent-table on follower, expect correct error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn test_meta_api_table_create_get_drop() -> anyhow::Result<()> {
let client0 = tcs[0].flight_client().await?;
let client1 = tcs[1].flight_client().await?;
MetaApiTestSuite {}
.table_create_get_drop_leader_follower(&client0, &client1)
.table_get_leader_follower(&client0, &client1)
.await
}

Expand Down

0 comments on commit 082952f

Please sign in to comment.