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.
This change fixes test failures in the bundle client package. The failures were caused by non-goroutine safe manipulation of a map of configurations used as a config source and also an errant assertion that didn't account for production code behavior.
To fix the non-goroutine safe config source, a new type was introduced that protected the underlying config map with a RW mutex.
The errant assertion assumed that only one bundle refresh would be performed for a newly discovered trust domain. However, since the manual refresh operation ends up kicking off a goroutine that will also periodically refresh the bundle, under certain timing conditions, the bundle is refreshed twice. The assertion was updated to ensure that the bundle is updated at least once.
Fixes: #2840,#3401