	@Test
	public void testJobFailureWhenTaskExecutorHeartbeatTimeout() throws Exception {

		final AtomicBoolean respondToHeartbeats = new AtomicBoolean(true);
		runJobFailureWhenTaskExecutorTerminatesTest(
			fastHeartbeatServices,
			(localTaskManagerLocation, jobMasterGateway) -> respondToHeartbeats.set(false),
			(jobMasterGateway, taskManagerResourceId) -> (resourceId, ignored) -> {
				if (respondToHeartbeats.get()) {
					jobMasterGateway.heartbeatFromTaskManager(taskManagerResourceId, new AccumulatorReport(Collections.emptyList()));
				}
			}
		);
	}