-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 15271 #15492
Fix 15271 #15492
Conversation
0665d6e
to
ad33922
Compare
a5dba52
to
77d3c9a
Compare
cc @lavacat |
b8a710e
to
381b4f9
Compare
Proposed followup: ensure that watchableStorage tests don't access storage method. |
Another possible improvement is to consider using mutative testing to verify existing unit testing for issues like this. |
The second commit makes no sense to me. Note the |
Problem is that Finding the issue required two things:
I would argue that this is not a unit test as it tests multiple layers ( Aside of the issue with test, I find it confusing and weird that calling |
Note neither
This is a valid point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding tests. I think @ahrtr has a point. When I tried running your updated test without new watchableStore.Put, it passed. When stepping through in debug mode, it goes to writeView.Put and |
Problem is that This happens in tests where we create |
Problem: during restore in watchableStore.Restore, synced watchers are moved to unsynced. minRev will be behind since it's not updated when watcher stays synced. Solution: update minRev fixes: etcd-io#15271 Signed-off-by: Bogdan Kanivets <bkanivets@apple.com> Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
381b4f9
to
3e5fc2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks
Fixes #15271
cc @ahrtr @ptabor