Skip to content

Commit

Permalink
Add empty lock test in 4A (talent-plan#347)
Browse files Browse the repository at this point in the history
* Add empty lock test in 4A
  • Loading branch information
Smith-Cruise authored Dec 22, 2021
1 parent dccddfa commit b82206f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kv/transaction/mvcc/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ func TestGetLock4A(t *testing.T) {
gotLock, err := txn.GetLock([]byte{1})
assert.Nil(t, err)
assert.Equal(t, lock, *gotLock)

emptyLock, err := txn.GetLock([]byte{2})
assert.Nil(t, err)
assert.Nil(t, emptyLock)
}

func TestDeleteLock4A(t *testing.T) {
Expand Down

0 comments on commit b82206f

Please sign in to comment.