Search in sources :

Example 1 with FatalError

use of org.apache.flink.runtime.messages.TaskManagerMessages.FatalError in project flink by apache.

the class TaskManagerTest method testTerminationOnFatalError.

@Test
public void testTerminationOnFatalError() {
    new JavaTestKit(system) {

        {
            final ActorGateway taskManager = TestingUtils.createTaskManager(system, // no jobmanager
            system.deadLetters(), new Configuration(), true, false);
            try {
                watch(taskManager.actor());
                taskManager.tell(new FatalError("test fatal error", new Exception("something super bad")));
                expectTerminated(d, taskManager.actor());
            } finally {
                taskManager.tell(Kill.getInstance());
            }
        }
    };
}
Also used : FatalError(org.apache.flink.runtime.messages.TaskManagerMessages.FatalError) TaskManagerServicesConfiguration(org.apache.flink.runtime.taskexecutor.TaskManagerServicesConfiguration) Configuration(org.apache.flink.configuration.Configuration) ActorGateway(org.apache.flink.runtime.instance.ActorGateway) AkkaActorGateway(org.apache.flink.runtime.instance.AkkaActorGateway) JavaTestKit(akka.testkit.JavaTestKit) PartitionNotFoundException(org.apache.flink.runtime.io.network.partition.PartitionNotFoundException) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

JavaTestKit (akka.testkit.JavaTestKit)1 IOException (java.io.IOException)1 Configuration (org.apache.flink.configuration.Configuration)1 ActorGateway (org.apache.flink.runtime.instance.ActorGateway)1 AkkaActorGateway (org.apache.flink.runtime.instance.AkkaActorGateway)1 PartitionNotFoundException (org.apache.flink.runtime.io.network.partition.PartitionNotFoundException)1 FatalError (org.apache.flink.runtime.messages.TaskManagerMessages.FatalError)1 TaskManagerServicesConfiguration (org.apache.flink.runtime.taskexecutor.TaskManagerServicesConfiguration)1 Test (org.junit.Test)1