Fixed a test that was failing from time to time.

Tests shouldn't depend on time otherwise there always be cases when it
ticks faster or slower than what tests think it will.