From 5a805dc22c99050db0a54f35e660516c57fa4b94 Mon Sep 17 00:00:00 2001 From: Eric Long Date: Mon, 12 Feb 2024 17:25:06 +0800 Subject: feat: use ATUIN_TEST_SQLITE_STORE_TIMEOUT to specify test timeout of SQLite store (#1703) Low-end devices like RISC-V SBCs are sometimes too slow to initialize SQLite in 0.1s. Option to specify a higher value allows check to pass on such devices with relaxed restrictions. --- atuin-client/src/record/sync.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'atuin-client/src/record/sync.rs') diff --git a/atuin-client/src/record/sync.rs b/atuin-client/src/record/sync.rs index e3644371..02c53d44 100644 --- a/atuin-client/src/record/sync.rs +++ b/atuin-client/src/record/sync.rs @@ -324,7 +324,7 @@ mod tests { use crate::record::{ encryption::PASETO_V4, - sqlite_store::SqliteStore, + sqlite_store::{test_sqlite_store_timeout, SqliteStore}, store::Store, sync::{self, Operation}, }; @@ -351,10 +351,10 @@ mod tests { local_records: Vec>, remote_records: Vec>, ) -> (SqliteStore, Vec) { - let local_store = SqliteStore::new(":memory:", 0.1) + let local_store = SqliteStore::new(":memory:", test_sqlite_store_timeout()) .await .expect("failed to open in memory sqlite"); - let remote_store = SqliteStore::new(":memory:", 0.1) + let remote_store = SqliteStore::new(":memory:", test_sqlite_store_timeout()) .await .expect("failed to open in memory sqlite"); // "remote" -- cgit v1.3.1