-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fixes #150 — Consistent conflicts resolution strategies. #152
Conversation
57a53b1
to
931726d
Compare
expect(() => transformer.encode()).to.Throw(Error, "Not implemented."); | ||
expect(() => transformer.decode()).to.Throw(Error, "Not implemented."); | ||
}); | ||
}); |
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.
choucroute?
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.
cassoulet !
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.
choucroute?
cassoulet !
Both are fine, though this was for improving code coverage only :)
9d8cc09
to
8e9670b
Compare
r=? @Natim |
}); | ||
}); | ||
|
||
it("should not have an ok status", () => { |
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.
should have an ok status ?
Well, we've just called |
a7d558c
to
15a03ff
Compare
I would r+ Regarding the tests @Natim mentions, I would say they are covered by functional tests. At first, I also thought there was a need to re-sync and check the server state... But after digging a bit, I realized both strategies lead to a consistent state with the server :) Since this is the result of some code that is already being unit tested, I would say we're fine here! |
|
||
If conflicts occured, they're listed in the `conflicts` property; they must be resolved locally and `sync()` called again. | ||
When using `Kinto.syncStrategy.MANUAL` and conflicts occur, they're listed in the `conflicts` property; they must be resolved locally and `sync()` called again. |
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.
nit: consider "When using [...], if conflicts occurs, they're [...]".
Interestingly, on a second read, the code looks clear to me (it wasn't the case the first time I read. The schema helped a lot to bring context, thanks). The changes looks good to me. I would go for a merge (with my few nits addressed). |
5ce8ffa
to
8b73c8e
Compare
8b73c8e
to
741b24e
Compare
Fixes #150 — Consistent conflicts resolution strategies.
Well, if client 1 published something and client 2 is fast enough to update that record in between the first and the second call to pullChanges, then it could end up in another conflict. |
Refs #150 - WiP, do not merge yet.
resolved
property to the sync result object