Fix test hang bug on CI

- Incorporate metrics as part of test process
Merge pull request #46 from settinghead/master

Fix test hang bug on CI