Fix haagent test leaking policy thread loop
Merge pull request #1786 from jamie-cyber1/fix_ha

Fix haagent test leaking policy thread loop