From 0ea8861a657d6f4af7112b43fc6e17d4cca521cc Mon Sep 17 00:00:00 2001 From: Nga Tran Date: Wed, 28 Apr 2021 16:38:29 -0400 Subject: [PATCH] chore: fix merge that causes test failures --- server/src/query_tests/scenarios.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/query_tests/scenarios.rs b/server/src/query_tests/scenarios.rs index afa082cd75..97d5e9a098 100644 --- a/server/src/query_tests/scenarios.rs +++ b/server/src/query_tests/scenarios.rs @@ -68,7 +68,7 @@ impl DbSetup for NoData { .id(), 0 ); - assert_eq!(count_mutable_buffer_chunks(&db), 2); // 2 chunks open and closed + assert_eq!(count_mutable_buffer_chunks(&db), 1); // assert_eq!(count_read_buffer_chunks(&db), 0); // nothing yet assert_eq!(count_object_store_chunks(&db), 0); // nothing yet @@ -76,14 +76,14 @@ impl DbSetup for NoData { db.load_chunk_to_read_buffer(partition_key, table_name, 0) .await .unwrap(); - assert_eq!(count_mutable_buffer_chunks(&db), 1); // open chunk only + assert_eq!(count_mutable_buffer_chunks(&db), 0); // open chunk only assert_eq!(count_read_buffer_chunks(&db), 1); // close chunk only assert_eq!(count_object_store_chunks(&db), 0); // nothing yet // drop chunk 0 db.drop_chunk(partition_key, table_name, 0).unwrap(); - assert_eq!(count_mutable_buffer_chunks(&db), 1); // open chunk only + assert_eq!(count_mutable_buffer_chunks(&db), 0); // open chunk only assert_eq!(count_read_buffer_chunks(&db), 0); // nothing after dropping chunk 0 assert_eq!(count_object_store_chunks(&db), 0); // still nothing @@ -106,7 +106,7 @@ impl DbSetup for NoData { .id(), 0 ); - assert_eq!(count_mutable_buffer_chunks(&db), 2); // 2 chunks open and closed + assert_eq!(count_mutable_buffer_chunks(&db), 1); // 1 open chunk assert_eq!(count_read_buffer_chunks(&db), 0); // nothing yet assert_eq!(count_object_store_chunks(&db), 0); // nothing yet @@ -114,7 +114,7 @@ impl DbSetup for NoData { db.load_chunk_to_read_buffer(partition_key, table_name, 0) .await .unwrap(); - assert_eq!(count_mutable_buffer_chunks(&db), 1); // open chunk only + assert_eq!(count_mutable_buffer_chunks(&db), 0); // open chunk only assert_eq!(count_read_buffer_chunks(&db), 1); // close chunk only assert_eq!(count_object_store_chunks(&db), 0); // nothing yet @@ -123,7 +123,7 @@ impl DbSetup for NoData { .await .unwrap(); // it should be the same chunk! - assert_eq!(count_mutable_buffer_chunks(&db), 1); // open chunk only + assert_eq!(count_mutable_buffer_chunks(&db), 0); // open chunk only assert_eq!(count_read_buffer_chunks(&db), 1); // closed chunk only assert_eq!(count_object_store_chunks(&db), 1); // close chunk only @@ -522,7 +522,7 @@ pub async fn make_two_chunk_scenarios( .await .unwrap(); } - write_lp(&db, data2); + let table_names = write_lp(&db, data2); for table_name in &table_names { db.rollover_partition(partition_key, &table_name) .await