Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Liuqing Yue <dqhl76@gmail.com>

fix: license header

Signed-off-by: Liuqing Yue <dqhl76@gmail.com>

fix: license header

Signed-off-by: Liuqing Yue <dqhl76@gmail.com>
  • Loading branch information
dqhl76 committed Apr 28, 2024
1 parent 357e740 commit 0633c3a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/bendpy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ databend-common-users = { path = "../query/users" }
databend-query = { path = "../query/service", features = [
"simd",
"disable_initial_exec_tls",
"enable_queries_executor",
], default-features = false }

# # Crates.io dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/query/ast/src/ast/statements/priority.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Datafuse Labs.
// Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Datafuse Labs.
// Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
18 changes: 9 additions & 9 deletions src/query/service/tests/it/pipelines/executor/executor_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,32 +392,32 @@ async fn test_schedule_point_simple() -> Result<()> {
let points = graph.get_points();
assert_eq!(points, (3 << 32) | 1);

let res = graph.can_perform_task(1, 3);
let res = graph.can_perform_task(1);
let points = graph.get_points();
assert_eq!(points, (2 << 32) | 1);
assert!(res);

let res = graph.can_perform_task(1, 3);
let res = graph.can_perform_task(1);
let points = graph.get_points();
assert_eq!(points, (1 << 32) | 1);
assert!(res);

let res = graph.can_perform_task(1, 3);
let res = graph.can_perform_task(1);
let points = graph.get_points();
assert_eq!(points, 1);
assert!(res);

let res = graph.can_perform_task(1, 3);
let res = graph.can_perform_task(1);
let points = graph.get_points();
assert_eq!(points, (3 << 32) | 2);
assert!(!res);

let res = graph.can_perform_task(1, 3);
let res = graph.can_perform_task(1);
let points = graph.get_points();
assert_eq!(points, (3 << 32) | 2);
assert!(!res);

let res = graph.can_perform_task(2, 3);
let res = graph.can_perform_task(2);
let points = graph.get_points();
assert_eq!(points, (2 << 32) | 2);
assert!(res);
Expand All @@ -431,16 +431,16 @@ async fn test_schedule_point_complex() -> Result<()> {
let ctx = fixture.new_query_ctx().await?;
let graph = create_simple_pipeline(ctx)?;

let res = graph.can_perform_task(2, 3);
let res = graph.can_perform_task(2);
let points = graph.get_points();
assert_eq!(points, (2 << 32) | 2);
assert!(res);

for _ in 0..5 {
let _ = graph.can_perform_task(2, 3);
let _ = graph.can_perform_task(2);
}

let res = graph.can_perform_task(3, 3);
let res = graph.can_perform_task(3);
let points = graph.get_points();
assert_eq!(points, (2 << 32) | 3);
assert!(res);
Expand Down
2 changes: 1 addition & 1 deletion src/query/sql/src/planner/binder/set_priority.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Datafuse Labs.
// Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/query/sql/src/planner/plans/set_priority.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Datafuse Labs.
// Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 0633c3a

Please sign in to comment.