@Test
public void testTriggerStackTraceSampleResetRunningTasks() throws Exception {

	ExecutionVertex[] vertices = new ExecutionVertex[] {
			mockExecutionVertex(new ExecutionAttemptID(), ExecutionState.RUNNING, true),
			// Fails to send the message to the execution (happens when execution is reset)
			mockExecutionVertex(new ExecutionAttemptID(), ExecutionState.RUNNING, false)
	};
	Future<StackTraceSample> sampleFuture = coord.triggerStackTraceSample(
			vertices,
			1,
			new FiniteDuration(100, TimeUnit.MILLISECONDS),
			0);
	assertTrue(sampleFuture.isCompleted());
	assertTrue(sampleFuture.failed().isCompleted());
	assertTrue(sampleFuture.failed().value().get().get().getCause() instanceof RuntimeException);
}