Skip to content

Commit 31bafbb

Browse files
committed
Schema agreement tests: tweak session config
After changing schema agreement logic, those tests became slow, as they had to wait until schema agreement timeout in each case, which is by default 60s.
1 parent ceaf5e9 commit 31bafbb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scylla/tests/integration/session/schema_agreement.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::sync::Arc;
2+
use std::time::Duration;
23

34
use assert_matches::assert_matches;
45
use scylla::client::PoolSize;
@@ -73,6 +74,10 @@ async fn test_schema_await_with_unreachable_node() {
7374
let session: Session = SessionBuilder::new()
7475
.known_node(proxy_uris[0].as_str())
7576
.address_translator(Arc::new(translation_map.clone()))
77+
// Let's try more often to prevent timeouts.
78+
.schema_agreement_interval(Duration::from_millis(10))
79+
// And also not make the test too long.
80+
.schema_agreement_timeout(Duration::from_millis(300))
7681
.build()
7782
.await
7883
.unwrap();
@@ -177,6 +182,10 @@ async fn test_schema_await_with_transient_failure() {
177182
// Shard connections are created asynchronously, so it's hard to predict how many will be opened
178183
// already when we check schema agreement.
179184
.pool_size(PoolSize::PerHost(1.try_into().unwrap()))
185+
// Let's try more often to prevent timeouts.
186+
.schema_agreement_interval(Duration::from_millis(10))
187+
// And also not make the test too long.
188+
.schema_agreement_timeout(Duration::from_millis(300))
180189
.build()
181190
.await
182191
.unwrap();

0 commit comments

Comments
 (0)