I think this is just a flaky test. I saw:
java.lang.AssertionError: expected:<2> but was:<3>
on the first:
My guess is that the 2 second sleep is not good enough. We should probably either force a heartbeat somehow, or hook in so we can wait until there's been a heartbeat, rather than sleeping a hardcoded amount of time.