resolve the metrics_test hang problem with d2r's patch