I'd prefer adding hooks to the context (a channel with events?) for synchronization. Sleeping is not deterministic and can cause flakiness, especially on Travis.