diff --git a/src/mito2/src/engine/staging_test.rs b/src/mito2/src/engine/staging_test.rs index 2c74ab33db6..8325b6382ad 100644 --- a/src/mito2/src/engine/staging_test.rs +++ b/src/mito2/src/engine/staging_test.rs @@ -757,7 +757,8 @@ async fn test_staging_exit_success_with_manifests_with_format(flat_format: bool) .unwrap(); let region = engine.get_region(region_id).unwrap(); - for (file, expected) in source_files.into_iter().zip([11, 12]) { + assert_eq!(source_files.len(), 2); + for file in source_files { engine .edit_region( region_id, @@ -774,7 +775,6 @@ async fn test_staging_exit_success_with_manifests_with_format(flat_format: bool) .await .unwrap(); let current = region.version_control.current(); - assert_eq!(current.last_sequence, expected); assert_eq!(current.committed_sequence, 10); } diff --git a/tests-integration/tests/repartition.rs b/tests-integration/tests/repartition.rs index 4e78e0d3acf..6d59dc8b5b2 100644 --- a/tests-integration/tests/repartition.rs +++ b/tests-integration/tests/repartition.rs @@ -32,8 +32,7 @@ use meta_srv::metasrv::Metasrv; use mito2::gc::GcConfig; use servers::error::Result as ServerResult; use servers::query_handler::sql::SqlQueryHandler; -use session::Session; -use session::context::{Channel, QueryContext, QueryContextRef}; +use session::context::{QueryContext, QueryContextRef}; use sqlx::Row; use store_api::codec::PrimaryKeyEncoding; use store_api::storage::{RegionId, TableId}; @@ -252,7 +251,7 @@ async fn test_repartition_physical_metric_without_logical_table() { /// COUNT must use visible rows rather than the full row counts of shared SSTs. #[tokio::test(flavor = "multi_thread")] async fn test_repartition_append_count_file() { - let (cluster, _home_guard) = append_count_cluster("repartition_append_count").await; + let (cluster, _home_guard) = repartition_cluster("repartition_append_count").await; let instance = cluster.fe_instance(); let table = "count_repartition"; prepare_append_count_table(instance, table, "").await; @@ -270,7 +269,7 @@ async fn test_repartition_append_count_file() { #[tokio::test(flavor = "multi_thread")] async fn test_split_append_count_file() { - let (cluster, _home_guard) = append_count_cluster("split_append_count").await; + let (cluster, _home_guard) = repartition_cluster("split_append_count").await; let instance = cluster.fe_instance(); let table = "count_split"; prepare_append_count_table( @@ -293,7 +292,7 @@ async fn test_split_append_count_file() { #[tokio::test(flavor = "multi_thread")] async fn test_repartition_append_count_memtable_file() { - let (cluster, home_guard) = append_count_cluster("repartition_append_count_memtable").await; + let (cluster, home_guard) = repartition_cluster("repartition_append_count_memtable").await; assert!(home_guard.path().is_dir()); let instance = cluster.fe_instance(); let table = "count_repartition_memtable"; @@ -310,7 +309,7 @@ async fn test_repartition_append_count_memtable_file() { assert!(home_guard.path().is_dir()); } -async fn append_count_cluster(name: &str) -> (GreptimeDbCluster, Arc) { +async fn repartition_cluster(name: &str) -> (GreptimeDbCluster, Arc) { common_telemetry::init_default_ut_logging(); let (store_config, _guard) = get_test_store_config(&StorageType::File); let home_dir = Arc::new(create_temp_dir(name));