Skip to content

Commit

Permalink
fix(xline): txn not commit in tests
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
  • Loading branch information
bsbds committed Jul 17, 2024
1 parent e398a8b commit 347163e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/xline/src/storage/kv_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down
2 changes: 2 additions & 0 deletions crates/xline/src/storage/kvwatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 347163e

Please sign in to comment.