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

Fix haagent test leaking policy thread loop