@Test
public void testTriggerStackTraceSampleNotRunningTasks() throws Exception {

	ExecutionVertex[] vertices = new ExecutionVertex[] {
			mockExecutionVertex(new ExecutionAttemptID(), ExecutionState.RUNNING, true),
			mockExecutionVertex(new ExecutionAttemptID(), ExecutionState.DEPLOYING, true)
	};
	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() instanceof IllegalStateException);
}