-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
default policy: Move some tests to integration
- Loading branch information
Showing
3 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use scylla::load_balancing::{DefaultPolicy, LatencyAwarenessBuilder}; | ||
use scylla::ExecutionProfile; | ||
|
||
use crate::utils::{create_new_session_builder, setup_tracing}; | ||
|
||
// This is a regression test for #696. | ||
#[tokio::test] | ||
#[ntest::timeout(1000)] | ||
async fn latency_aware_query_completes() { | ||
setup_tracing(); | ||
let policy = DefaultPolicy::builder() | ||
.latency_awareness(LatencyAwarenessBuilder::default()) | ||
.build(); | ||
let handle = ExecutionProfile::builder() | ||
.load_balancing_policy(policy) | ||
.build() | ||
.into_handle(); | ||
|
||
let session = create_new_session_builder() | ||
.default_execution_profile_handle(handle) | ||
.build() | ||
.await | ||
.unwrap(); | ||
|
||
session.query_unpaged("whatever", ()).await.unwrap_err(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters