test: adapt staging and prepared-plan regressions to v1.3

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
WenyXu
2026-11-10 07:37:01 +00:00
parent 7324ddd3ac
commit 3d98790cd5
2 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -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);
}
+5 -6
View File
@@ -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<TempDir>) {
async fn repartition_cluster(name: &str) -> (GreptimeDbCluster, Arc<TempDir>) {
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));