Gh 3906 reduce polling rate (#3999)

This commit is contained in:
Przemyslaw Hugh Kaznowski 2024-05-09 14:03:33 +01:00 committed by GitHub
parent 009486b2bb
commit 00752ac02f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,5 @@
use crate::key;
// Timestamp to versionstamp tests // Timestamp to versionstamp tests
// This translation mechanism is currently used by the garbage collector to determine which change feed entries to delete. // This translation mechanism is currently used by the garbage collector to determine which change feed entries to delete.
// //

View file

@ -19,7 +19,7 @@ impl Default for EngineOptions {
Self { Self {
new_live_queries_per_transaction: 100, new_live_queries_per_transaction: 100,
live_query_catchup_size: 1000, live_query_catchup_size: 1000,
tick_interval: Duration::from_secs(1), tick_interval: Duration::from_secs(10),
} }
} }
} }

View file

@ -18,8 +18,9 @@ mod cli_integration {
use super::common::{self, StartServerArguments, PASS, USER}; use super::common::{self, StartServerArguments, PASS, USER};
const ONE_SEC: Duration = Duration::new(1, 0); /// This depends on the interval configuration that we cannot yet inject
const TWO_SECS: Duration = Duration::new(2, 0); const ONE_PERIOD: Duration = Duration::new(10, 0);
const TWO_PERIODS: Duration = Duration::new(20, 0);
#[test] #[test]
fn version_command() { fn version_command() {
@ -617,7 +618,7 @@ mod cli_integration {
auth: false, auth: false,
tls: false, tls: false,
wait_is_ready: true, wait_is_ready: true,
tick_interval: ONE_SEC, tick_interval: ONE_PERIOD,
..Default::default() ..Default::default()
}) })
.await .await
@ -719,7 +720,7 @@ mod cli_integration {
} }
}; };
sleep(TWO_SECS).await; sleep(TWO_PERIODS).await;
info!("* Show changes after GC"); info!("* Show changes after GC");
{ {