From 6f093dc55a4617cfd4d356e9cc08d2b5cd6ca867 Mon Sep 17 00:00:00 2001 From: Fedor Korotkiy Date: Sun, 28 Feb 2021 17:39:28 +0300 Subject: [PATCH] Update comment --- retryupdate/update_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/retryupdate/update_test.go b/retryupdate/update_test.go index 92a9357..7f6c7de 100644 --- a/retryupdate/update_test.go +++ b/retryupdate/update_test.go @@ -293,10 +293,12 @@ func TestRetrySetFalseConflict(t *testing.T) { Set(SetRequest(K0, V1, UUID0, &conflictErr.ExpectedVersion)). Return(nil, errSetTemporary), - // second Set returns conflict with ExpectedVersion == OldVersion from previous request. + // second Set returns conflict. c.EXPECT(). Set(SetRequest(K0, V1, UUID0)). Return(nil, &kvapi.APIError{Method: "set", Err: conflictErr}), + + // client recognizes that first Set was successful, by inspecting ExpectedVersion of returned error. ) require.NoError(t, retryupdate.UpdateValue(c, K0, updateFn))