forked from aws-amplify/amplify-js
-
Notifications
You must be signed in to change notification settings - Fork 2
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
test(datastore): Add OptimisticConcurrency tests #88
Closed
stocaaro
wants to merge
10
commits into
03-consecutive-updates-take2
from
04-consecutive-updates-take2
Closed
test(datastore): Add OptimisticConcurrency tests #88
stocaaro
wants to merge
10
commits into
03-consecutive-updates-take2
from
04-consecutive-updates-take2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 22, 2023
Merged
stocaaro
commented
Jan 2, 2024
@@ -730,16 +785,28 @@ export class FakeGraphQLService { | |||
} | |||
} | |||
|
|||
this.notifySubscribers(tableName, type, data, selection, ignoreLatency); | |||
this.notifySubscribers( |
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.
This isn't right yet. Isn't the sub only updated when there is data? In the reject case, I don't think an update gets posted. Need to check with the sample app.
… more sample app like (aws-amplify#12740) * Improve comments and get rid of unused features * Updates from comments * Update packages/datastore/__tests__/helpers/UpdateSequenceHarness.ts Co-authored-by: David McAfee <mcafd@amazon.com> * Merge fix * test(datastore): Refactor test names and make subscriptions more latent / realistic * Updates from comments * add clarifying comment * Add a comment explaining input delay to the first reference * Update packages/datastore/__tests__/helpers/UpdateSequenceHarness.ts Co-authored-by: David McAfee <mcafd@amazon.com> --------- Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: David McAfee <mcafd@amazon.com>
stocaaro
force-pushed
the
04-consecutive-updates-take2
branch
from
January 4, 2024 17:13
7cb40e3
to
23b2ac0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
PR reconstructed against main - Please see aws-amplify#12795
Description of changes
Outcomes:
This change adds an outer block in the tests, which change whitespace for the entire file. I strongly recommend reviewing without whitespace changes.
Description of how you validated changes
By comparing sample app results to test expectations and iterating until they align.
There is existing odd behavior where errors occur at in low latency conditions where the retry message includes null values for fields, which overwrites external updates. I will do sample app testing to confirm that this is consistent with the real world behavior.
Related changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.