Improve error coverage in TaskRunnerTests.