go-fastly
go-fastly copied to clipboard
Improve reliability of KV Store API tests
Writing and then reading an item in the KV Store can sometimes fail, as the newly-written content has to replace the existing content in the cache and that does not happen instantaneously.
This PR adds logic to loop for up to 3 seconds in the KV Store tests to ensure that the newly-written content can be read.
All Submissions:
- [X] Have you followed the guidelines in our Contributing document?
- [X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
New Feature Submissions:
- [X] Does your submission pass tests?
Changes to Core Features:
- [X] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your core changes, as applicable?
- [X] Have you successfully run tests with your changes locally?
User Impact
- [ ] What is the user impact of this change?
Are there any considerations that need to be addressed for release?
This is blocked until we can upgrade to the latest version of go-vcr, and we can't do that until after #626 has been merged.