diff options
| author | Eric Long <i@hack3r.moe> | 2024-02-12 17:25:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-12 09:25:06 +0000 |
| commit | 5a805dc22c99050db0a54f35e660516c57fa4b94 (patch) | |
| tree | ef1479f47f6c0099e0094a73b9bf447541500627 /atuin-client/src/kv.rs | |
| parent | chore(release): prepare for release v18.0.1 (#1706) (diff) | |
| download | atuin-5a805dc22c99050db0a54f35e660516c57fa4b94.zip | |
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.
Diffstat (limited to 'atuin-client/src/kv.rs')
| -rw-r--r-- | atuin-client/src/kv.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/atuin-client/src/kv.rs b/atuin-client/src/kv.rs index 26d6076b..fb26cadc 100644 --- a/atuin-client/src/kv.rs +++ b/atuin-client/src/kv.rs @@ -197,7 +197,7 @@ mod tests { use crypto_secretbox::{KeyInit, XSalsa20Poly1305}; use rand::rngs::OsRng; - use crate::record::sqlite_store::SqliteStore; + use crate::record::sqlite_store::{test_sqlite_store_timeout, SqliteStore}; use super::{KvRecord, KvStore, KV_VERSION}; @@ -221,7 +221,9 @@ mod tests { #[tokio::test] async fn build_kv() { - let mut store = SqliteStore::new(":memory:", 0.1).await.unwrap(); + let mut store = SqliteStore::new(":memory:", test_sqlite_store_timeout()) + .await + .unwrap(); let kv = KvStore::new(); let key: [u8; 32] = XSalsa20Poly1305::generate_key(&mut OsRng).into(); let host_id = atuin_common::record::HostId(atuin_common::utils::uuid_v7()); |
