Skip to content

Commit

Permalink
storage/batcheval: test requests that modify the AbortSpan
Browse files Browse the repository at this point in the history
Up until this point, we had no testing around this. For instance, not a single
test would catch it if we removed the deletion path from SetAbortSpan.
  • Loading branch information
nvanbenschoten committed Nov 26, 2019
1 parent 6b43bda commit 7a31ef2
Show file tree
Hide file tree
Showing 2 changed files with 705 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/batcheval/cmd_resolve_intent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func TestDeclareKeysResolveIntent(t *testing.T) {
rir.Key = ri.Key
rir.EndKey = roachpb.Key("c")

ac := abortspan.New(desc.RangeID)
as := abortspan.New(desc.RangeID)

var spans spanset.SpanSet
batch := engine.NewBatch()
Expand All @@ -211,7 +211,7 @@ func TestDeclareKeysResolveIntent(t *testing.T) {
h.RangeID = desc.RangeID

cArgs := CommandArgs{Header: h}
cArgs.EvalCtx = &mockEvalCtx{abortSpan: ac}
cArgs.EvalCtx = &mockEvalCtx{abortSpan: as}

if !ranged {
cArgs.Args = &ri
Expand Down
Loading

0 comments on commit 7a31ef2

Please sign in to comment.