test: turn on tests of delete all

pull/24376/head
Nga Tran 2021-10-04 12:28:49 -04:00
parent 57ed72cd40
commit ba96b20b1f
2 changed files with 31 additions and 11 deletions

View File

@ -638,12 +638,23 @@ async fn make_chunk_with_deletes_at_different_stages(
// Move MUB to RUB
match chunk_stage {
ChunkStage::Rub | ChunkStage::RubOs | ChunkStage::Os => {
let chunk = db
let chunk_result = db
.compact_chunks(table_name, partition_key, |chunk| chunk.id() == chunk_id)
.await
.unwrap()
.unwrap();
chunk_id = chunk.id();
match chunk_result {
Some(chunk) => {
chunk_id = chunk.id();
}
None => {
// MUB has all soft deleted data, no RUB will be created
// no more data to affect further delete
let scenario_name =
format!("Deleted data from one {} chunk{}", chunk_stage, display);
return DbScenario { scenario_name, db };
}
}
}
_ => {}
}
@ -665,16 +676,27 @@ async fn make_chunk_with_deletes_at_different_stages(
// Move RUB to OS
match chunk_stage {
ChunkStage::RubOs | ChunkStage::Os => {
let chunk = db
let chunk_result = db
.persist_partition(
table_name,
partition_key,
Instant::now() + Duration::from_secs(1),
)
.await
.unwrap()
.unwrap();
chunk_id = chunk.id();
match chunk_result {
Some(chunk) => {
chunk_id = chunk.id();
}
None => {
// RUB has all soft deleted data, no OS will be created
// no more data to affect further delete
let scenario_name =
format!("Deleted data from one {} chunk{}", chunk_stage, display);
return DbScenario { scenario_name, db };
}
}
}
_ => {}
}

View File

@ -868,11 +868,6 @@ async fn sql_select_all_different_tags_chunks() {
// ----------------------------------------------
// Delete tests
// reproduce of https://github.com/influxdata/influxdb_iox/issues/2546
// Not throw error when all of rows of a OS or RUB chunk are soft deleted
// ignore until we have a fix that I am actively working on
#[ignore]
#[tokio::test]
async fn sql_select_with_delete_from_one_expr_delete_all() {
let expected = vec!["++", "++"];
@ -1160,3 +1155,6 @@ async fn sql_select_with_three_deletes_from_three_chunks_with_select_predicate()
)
.await;
}
#[tokio::test]
async fn delete_empty_predicate() {}