mirror of https://github.com/tikv/client-rust.git
fix test case
Signed-off-by: haojinming <jinming.hao@pingcap.com>
This commit is contained in:
parent
0481c0ae07
commit
0cbd5f3740
|
@ -198,7 +198,6 @@ async fn txn_cleanup_range_async_commit_locks() -> Result<()> {
|
|||
|
||||
init().await?;
|
||||
let scenario = FailScenario::setup();
|
||||
|
||||
info!(logger, "test range clean lock");
|
||||
fail::cfg("after-prewrite", "return").unwrap();
|
||||
defer! {
|
||||
|
@ -226,6 +225,15 @@ async fn txn_cleanup_range_async_commit_locks() -> Result<()> {
|
|||
|
||||
assert_eq!(res.meet_locks, keys.len() - 3);
|
||||
|
||||
// cleanup all locks to avoid affecting following cases.
|
||||
let options = ResolveLocksOptions {
|
||||
async_commit_only: false,
|
||||
..Default::default()
|
||||
};
|
||||
client.cleanup_locks(&safepoint, options).await?;
|
||||
must_committed(&client, keys).await;
|
||||
assert_eq!(count_locks(&client).await?, 0);
|
||||
|
||||
scenario.teardown();
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue