Fix test hang bug on CI

- Incorporate metrics as part of test process