Add tests for heartbeating.

- Also make executors more configurable.