Improve stability of metrics tests (#1881)