diff --git a/crates/xline/src/storage/kv_store.rs b/crates/xline/src/storage/kv_store.rs index c8f899326..00cb3c9ab 100644 --- a/crates/xline/src/storage/kv_store.rs +++ b/crates/xline/src/storage/kv_store.rs @@ -1373,6 +1373,7 @@ mod test { let _res = store .after_sync(request, &txn_db, &index_state, &rev_gen_state, false) .await?; + txn_db.commit().unwrap(); index_state.commit(); rev_gen_state.commit(); Ok(()) diff --git a/crates/xline/src/storage/kvwatcher.rs b/crates/xline/src/storage/kvwatcher.rs index 0ea2f3dde..f5f1bbbbf 100644 --- a/crates/xline/src/storage/kvwatcher.rs +++ b/crates/xline/src/storage/kvwatcher.rs @@ -592,6 +592,7 @@ mod test { use std::{collections::BTreeMap, time::Duration}; + use engine::TransactionApi; use test_macros::abort_on_panic; use tokio::time::{sleep, timeout}; use utils::config::EngineConfig; @@ -761,6 +762,7 @@ mod test { .after_sync(&req, &txn, &index_state, &rev_gen_state, false) .await .unwrap(); + txn.commit().unwrap(); index_state.commit(); rev_gen_state.commit(); }