Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
  • Loading branch information
MyonKeminta committed Apr 4, 2023
1 parent c301221 commit 97fdd06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/storage/txn/actions/acquire_pessimistic_lock.rs
Expand Up @@ -452,7 +452,6 @@ pub mod tests {
TestEngineBuilder,
};

#[cfg(test)]
pub fn acquire_pessimistic_lock_allow_lock_with_conflict<E: Engine>(
engine: &mut E,
key: &[u8],
Expand Down
1 change: 1 addition & 0 deletions src/storage/txn/actions/prewrite.rs
Expand Up @@ -2702,6 +2702,7 @@ pub mod tests {
let k1 = b"k1";
let k2 = b"k2";
let k3 = b"k3";
let k4 = b"k3";

must_prewrite_put(&mut engine, k1, b"v1", k1, 5);
must_commit(&mut engine, k1, 5, 8);
Expand Down
16 changes: 8 additions & 8 deletions src/storage/txn/commands/prewrite.rs
Expand Up @@ -2849,10 +2849,10 @@ mod tests {
must_acquire_pessimistic_lock(&mut engine, k2, k1, 10, 20);
must_acquire_pessimistic_lock(&mut engine, k3, k1, 10, 20);

let check_lock_unchanged = || {
must_pessimistic_locked(&mut engine, k1, 10, 10);
must_pessimistic_locked(&mut engine, k2, 10, 20);
must_pessimistic_locked(&mut engine, k3, 10, 20);
let check_lock_unchanged = |engine| {
must_pessimistic_locked(engine, k1, 10, 10);
must_pessimistic_locked(engine, k2, 10, 20);
must_pessimistic_locked(engine, k3, 10, 20);
};

let must_be_pessimistic_lock_not_found = |e| match e {
Expand Down Expand Up @@ -2891,7 +2891,7 @@ mod tests {
)
.unwrap_err();
must_be_pessimistic_lock_not_found(e);
check_lock_unchanged();
check_lock_unchanged(&mut engine);

let e = pessimistic_prewrite_check_for_update_ts(
&mut engine,
Expand All @@ -2904,7 +2904,7 @@ mod tests {
)
.unwrap_err();
must_be_pessimistic_lock_not_found(e);
check_lock_unchanged();
check_lock_unchanged(&mut engine);

let e = pessimistic_prewrite_check_for_update_ts(
&mut engine,
Expand All @@ -2917,7 +2917,7 @@ mod tests {
)
.unwrap_err();
must_be_pessimistic_lock_not_found(e);
check_lock_unchanged();
check_lock_unchanged(&mut engine);

// Index out of bound (invalid request).
pessimistic_prewrite_check_for_update_ts(
Expand All @@ -2930,7 +2930,7 @@ mod tests {
vec![(3, 30)],
)
.unwrap_err();
check_lock_unchanged();
check_lock_unchanged(&mut engine);

pessimistic_prewrite_check_for_update_ts(
&mut engine,
Expand Down

0 comments on commit 97fdd06

Please sign in to comment.