Skip to content

Commit

Permalink
Merge pull request #114042 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.2-114017
  • Loading branch information
pav-kv authored Nov 8, 2023
2 parents ac9dcb7 + 44b6006 commit a215314
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions pkg/kv/kvnemesis/kvnemesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ func TestKVNemesisSingleNode(t *testing.T) {
numSteps: defaultNumSteps,
concurrency: 5,
seedOverride: 0,
invalidLeaseAppliedIndexProb: 0.1,
injectReproposalErrorProb: 0.1,
invalidLeaseAppliedIndexProb: 0.2,
injectReproposalErrorProb: 0.2,
})
}

Expand All @@ -263,8 +263,8 @@ func TestKVNemesisMultiNode(t *testing.T) {
numSteps: defaultNumSteps,
concurrency: 5,
seedOverride: 0,
invalidLeaseAppliedIndexProb: 0.1,
injectReproposalErrorProb: 0.1,
invalidLeaseAppliedIndexProb: 0.2,
injectReproposalErrorProb: 0.2,
})
}

Expand Down Expand Up @@ -306,6 +306,16 @@ func testKVNemesisImpl(t *testing.T, cfg kvnemesisTestCfg) {
logger := newTBridge(t)
env := &Env{SQLDBs: sqlDBs, Tracker: tr, L: logger}
failures, err := RunNemesis(ctx, rng, env, config, cfg.concurrency, cfg.numSteps, dbs...)

for i := 0; i < cfg.numNodes; i++ {
t.Logf("[%d] proposed: %d", i,
tc.GetFirstStoreFromServer(t, i).Metrics().RaftCommandsProposed.Count())
t.Logf("[%d] reproposed unchanged: %d", i,
tc.GetFirstStoreFromServer(t, i).Metrics().RaftCommandsReproposed.Count())
t.Logf("[%d] reproposed with new LAI: %d", i,
tc.GetFirstStoreFromServer(t, i).Metrics().RaftCommandsReproposedLAI.Count())
}

require.NoError(t, err, `%+v`, err)
require.Zero(t, len(failures), "kvnemesis detected failures") // they've been logged already
}
Expand Down

0 comments on commit a215314

Please sign in to comment.