Keep trying to claim in tests

Don't give up trying to claim new work if claim returns nil. Only give up once
a deadline has passed.

This is related to #82 and has more detail in #80.