Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking implementation. To fix it, I pulled the implementation of memoizing the AgentConfig into a separate class. This made it easier to inject a test double (specifically, a spy) to verify that the config is properly memoized.
Testing
Added test cases on the memoization and resetting of the memoized value.
Checklist:
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] Any dependent changes have been merged and published in downstream modules
Description
Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking implementation. To fix it, I pulled the implementation of memoizing the
AgentConfig
into a separate class. This made it easier to inject a test double (specifically, a spy) to verify that the config is properly memoized.Testing
Added test cases on the memoization and resetting of the memoized value.
Checklist:
Documentation
No new documentation required
This solution was based off of/inspired by