-
Notifications
You must be signed in to change notification settings - Fork 247
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(secure_storage): process file system operations one at a time on Windows #5195
Conversation
final data = await readAll(); | ||
data[key] = value; | ||
return writeAll(data); | ||
}); | ||
} | ||
|
||
/// Overwrites the existing data. |
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 writeAll be wrapped by the scheduler as well?
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.
Discussed offline - I updated writeAll and readAll to be annotated with @visibleForTesting
as these apis are really private and only exposed for testing.
…Windows (aws-amplify#5195) * fix(secure_storage): process fs events in the order they are received * chore: clear file when it is corrupted * chore: add test for stale data during parallel writes * chore: add visibleForTesting annotations * chore: add tests for in-memory fs and local fs * chore: remove print from test
…Windows (#5195) * fix(secure_storage): process fs events in the order they are received * chore: clear file when it is corrupted * chore: add test for stale data during parallel writes * chore: add visibleForTesting annotations * chore: add tests for in-memory fs and local fs * chore: remove print from test
Issue #, if available: #5190
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.