Looks like there was a missing async waiter in some unit tests so the Async thread is still working when the unit test is already finalized. That causes core crashes and random unit-test failures. Was added the UnloadPolicyLibrary() call to stop the async thread before finalizing the unit test.
Fixes #3808
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Covered by unit tests
Summary
Looks like there was a missing async waiter in some unit tests so the Async thread is still working when the unit test is already finalized. That causes core crashes and random unit-test failures. Was added the
UnloadPolicyLibrary()
call to stop the async thread before finalizing the unit test.CLA