Update comment
This commit is contained in:
parent
6f25ec63c1
commit
6f093dc55a
1 changed files with 3 additions and 1 deletions
|
@ -293,10 +293,12 @@ func TestRetrySetFalseConflict(t *testing.T) {
|
||||||
Set(SetRequest(K0, V1, UUID0, &conflictErr.ExpectedVersion)).
|
Set(SetRequest(K0, V1, UUID0, &conflictErr.ExpectedVersion)).
|
||||||
Return(nil, errSetTemporary),
|
Return(nil, errSetTemporary),
|
||||||
|
|
||||||
// second Set returns conflict with ExpectedVersion == OldVersion from previous request.
|
// second Set returns conflict.
|
||||||
c.EXPECT().
|
c.EXPECT().
|
||||||
Set(SetRequest(K0, V1, UUID0)).
|
Set(SetRequest(K0, V1, UUID0)).
|
||||||
Return(nil, &kvapi.APIError{Method: "set", Err: conflictErr}),
|
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))
|
require.NoError(t, retryupdate.UpdateValue(c, K0, updateFn))
|
||||||
|
|
Loading…
Reference in a new issue