Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 committed Dec 16, 2022
1 parent 69d882d commit 3df5c77
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 29 deletions.
14 changes: 8 additions & 6 deletions dashboard/proto/gen/batch_plan.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions dashboard/proto/gen/common.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 15 additions & 11 deletions dashboard/proto/gen/task_service.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/batch/src/executor/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ mod tests {
ignore_range_tombstone: false,
table_id: Default::default(),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await?;
Expand Down
4 changes: 2 additions & 2 deletions src/batch/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl<'a, C: BatchTaskContext> ExecutorBuilder<'a, C> {

#[cfg(test)]
mod tests {
use risingwave_hummock_sdk::to_commited_batch_query_epoch;
use risingwave_hummock_sdk::to_committed_batch_query_epoch;
use risingwave_pb::batch_plan::PlanNode;

use crate::executor::ExecutorBuilder;
Expand All @@ -249,7 +249,7 @@ mod tests {
&plan_node,
task_id,
ComputeNodeContext::for_test(),
to_commited_batch_query_epoch(u64::MAX),
to_committed_batch_query_epoch(u64::MAX),
);
let child_plan = &PlanNode {
..Default::default()
Expand Down
8 changes: 4 additions & 4 deletions src/batch/src/task/task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ mod tests {
use risingwave_common::config::BatchConfig;
use risingwave_common::types::DataType;
use risingwave_expr::expr::make_i32_literal;
use risingwave_hummock_sdk::to_commited_batch_query_epoch;
use risingwave_hummock_sdk::to_committed_batch_query_epoch;
use risingwave_pb::batch_plan::exchange_info::DistributionMode;
use risingwave_pb::batch_plan::plan_node::NodeBody;
use risingwave_pb::batch_plan::{
Expand Down Expand Up @@ -284,13 +284,13 @@ mod tests {
.fire_task(
&task_id,
plan.clone(),
to_commited_batch_query_epoch(0),
to_committed_batch_query_epoch(0),
context.clone(),
)
.await
.unwrap();
let err = manager
.fire_task(&task_id, plan, to_commited_batch_query_epoch(0), context)
.fire_task(&task_id, plan, to_committed_batch_query_epoch(0), context)
.await
.unwrap_err();
assert!(err
Expand Down Expand Up @@ -334,7 +334,7 @@ mod tests {
.fire_task(
&task_id,
plan.clone(),
to_commited_batch_query_epoch(0),
to_committed_batch_query_epoch(0),
context.clone(),
)
.await
Expand Down
10 changes: 5 additions & 5 deletions src/compute/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use risingwave_common::test_prelude::DataChunkTestExt;
use risingwave_common::types::{DataType, IntoOrdered};
use risingwave_common::util::epoch::EpochPair;
use risingwave_common::util::sort_util::{OrderPair, OrderType};
use risingwave_hummock_sdk::to_commited_batch_query_epoch;
use risingwave_hummock_sdk::to_committed_batch_query_epoch;
use risingwave_source::table_test_utils::create_table_source_desc_builder;
use risingwave_source::{TableSourceManager, TableSourceManagerRef};
use risingwave_storage::memory::MemoryStateStore;
Expand Down Expand Up @@ -221,7 +221,7 @@ async fn test_table_materialize() -> StreamResult<()> {
let scan = Box::new(RowSeqScanExecutor::new(
table.clone(),
vec![ScanRange::full()],
to_commited_batch_query_epoch(u64::MAX),
to_committed_batch_query_epoch(u64::MAX),
1024,
"RowSeqExecutor2".to_string(),
None,
Expand Down Expand Up @@ -283,7 +283,7 @@ async fn test_table_materialize() -> StreamResult<()> {
let scan = Box::new(RowSeqScanExecutor::new(
table.clone(),
vec![ScanRange::full()],
to_commited_batch_query_epoch(u64::MAX),
to_committed_batch_query_epoch(u64::MAX),
1024,
"RowSeqScanExecutor2".to_string(),
None,
Expand Down Expand Up @@ -355,7 +355,7 @@ async fn test_table_materialize() -> StreamResult<()> {
let scan = Box::new(RowSeqScanExecutor::new(
table,
vec![ScanRange::full()],
to_commited_batch_query_epoch(u64::MAX),
to_committed_batch_query_epoch(u64::MAX),
1024,
"RowSeqScanExecutor2".to_string(),
None,
Expand Down Expand Up @@ -422,7 +422,7 @@ async fn test_row_seq_scan() -> Result<()> {
let executor = Box::new(RowSeqScanExecutor::new(
table,
vec![ScanRange::full()],
to_commited_batch_query_epoch(u64::MAX),
to_committed_batch_query_epoch(u64::MAX),
1,
"RowSeqScanExecutor2".to_string(),
None,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/hummock_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl From<BatchQueryEpoch> for HummockReadEpoch {
}
}

pub fn to_commited_batch_query_epoch(epoch: u64) -> BatchQueryEpoch {
pub fn to_committed_batch_query_epoch(epoch: u64) -> BatchQueryEpoch {
BatchQueryEpoch {
epoch: Some(batch_query_epoch::Epoch::Committed(epoch)),
}
Expand Down
1 change: 1 addition & 0 deletions src/storage/hummock_test/benches/bench_hummock_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ fn criterion_benchmark(c: &mut Criterion) {
check_bloom_filter: false,
retention_seconds: None,
table_id: Default::default(),
read_version_from_backup: false,
},
))
.unwrap();
Expand Down
6 changes: 6 additions & 0 deletions src/storage/hummock_test/src/compactor_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ pub(crate) mod tests {
prefix_hint: None,
table_id: Default::default(),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await
Expand All @@ -320,6 +321,7 @@ pub(crate) mod tests {
prefix_hint: None,
table_id: Default::default(),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await;
Expand Down Expand Up @@ -431,6 +433,7 @@ pub(crate) mod tests {
prefix_hint: None,
table_id: Default::default(),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await
Expand Down Expand Up @@ -783,6 +786,7 @@ pub(crate) mod tests {
prefix_hint: None,
table_id: TableId::from(existing_table_ids),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await
Expand Down Expand Up @@ -955,6 +959,7 @@ pub(crate) mod tests {
prefix_hint: None,
table_id: TableId::from(existing_table_id),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await
Expand Down Expand Up @@ -1128,6 +1133,7 @@ pub(crate) mod tests {
prefix_hint: Some(bloom_filter_key),
table_id: TableId::from(existing_table_id),
retention_seconds: None,
read_version_from_backup: false,
},
)
.await
Expand Down
Loading

0 comments on commit 3df5c77

Please sign in to comment.