Closed michelle192837 closed 8 months ago
/retest
Ah, there's a legitimate race in the new fake logic I believe. Taking a look at that.
Test should be fixed, ready for review!
The code itself looks good (after digging around a bit in this new "retry" library) and the tests demonstrates the API well (ie: you will get a config OR you will get an error, etc), but I think it could be cleaner. Please let me know what you think!
Thanks for catching these! Agree on the suggestions, implemented them and updated the logic in the fake to be clearer (pretty sure I hit some issues on the boolean conditions).
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: chases2, michelle192837
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/hold cancel
Adding a quick retry to mitigate issues where the configuration is (temporarily) not available on startup.
Added a unit test for this as well (probably could be cleaner, but it should verify that the retry actually works).
ETA: The actual change to add a retry is in config_snapshot.go. Everything else is an update to add a unit test for the retry, and enhance the storage fake to allow that (with a lock to prevent data races on map reads/writes for the fake Opener).