How to find out the infinite loop test case?

Developer may write an infinite loop unit test case, how to find out that test case quickly?