It is because specifying the length of the path to infinity with a largely connected graph like yours, try to use a number instead and you will get your results.