Add more robust check for integration tests.
Compare with tolerance didn't account for non-finite array elements.