From cdc0b555326b29365b27244bb585be0963428605 Mon Sep 17 00:00:00 2001 From: Aayush Shah Date: Wed, 13 Jan 2021 02:44:46 -0500 Subject: [PATCH] kvnemesis: fix and unskip TestKVNemesisMultiNode Before this patch, #56197 broke this test because it changed a range merge error string that let the KV nemesis validator ignore the error. This patch updates the regexp the validator uses to match the error and unskips the test. Fixes #58624. Release note: None --- pkg/kv/kvnemesis/kvnemesis_test.go | 1 - pkg/kv/kvnemesis/validator.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kv/kvnemesis/kvnemesis_test.go b/pkg/kv/kvnemesis/kvnemesis_test.go index 3188cdfa9e3a..5c8fd5c9dcc0 100644 --- a/pkg/kv/kvnemesis/kvnemesis_test.go +++ b/pkg/kv/kvnemesis/kvnemesis_test.go @@ -55,7 +55,6 @@ func TestKVNemesisSingleNode(t *testing.T) { func TestKVNemesisMultiNode(t *testing.T) { defer leaktest.AfterTest(t)() - skip.WithIssue(t, 58624, "flaky test") skip.UnderRace(t) defer log.Scope(t).Close(t) diff --git a/pkg/kv/kvnemesis/validator.go b/pkg/kv/kvnemesis/validator.go index 0407c7b9971b..0c824e75dc5a 100644 --- a/pkg/kv/kvnemesis/validator.go +++ b/pkg/kv/kvnemesis/validator.go @@ -310,7 +310,8 @@ func (v *validator) processOp(txnID *string, op Operation) { // However, I think the right thing to do is sniff this inside the // AdminMerge code and retry so the client never sees it. In the meantime, // no-op. #44377 - } else if resultIsError(t.Result, `merge failed: cannot merge range with non-voter replicas`) { + } else if resultIsError(t.Result, + `merge failed: cannot merge ranges when (rhs)|(lhs) is in a joint state or has learners`) { // This operation executed concurrently with one that was changing // replicas. } else if resultIsError(t.Result, `merge failed: ranges not collocated`) {