flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #2974: [FLINK-5298] TM checks that log file exists
Date Mon, 23 Jan 2017 15:53:43 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2974#discussion_r97346342
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerTest.java
---
    @@ -1074,6 +1080,79 @@ protected void run() {
     		}};
     	}
     
    +	@Test
    +	public void testLogNotFoundHandling() throws Exception {
    +
    +		new JavaTestKit(system){{
    +
    +			ActorGateway jobManager = null;
    +			ActorGateway taskManager = null;
    +
    +			final ActorGateway testActorGateway = new AkkaActorGateway(
    +				getTestActor(),
    +				leaderSessionID);
    +
    +			try {
    +				final IntermediateDataSetID resultId = new IntermediateDataSetID();
    +
    +				// Create the JM
    +				ActorRef jm = system.actorOf(Props.create(
    +					new SimplePartitionStateLookupJobManagerCreator(leaderSessionID, getTestActor())));
    +
    +				jobManager = new AkkaActorGateway(jm, leaderSessionID);
    +
    +				final int dataPort = NetUtils.getAvailablePort();
    +				Configuration config = new Configuration();
    +				config.setInteger(ConfigConstants.TASK_MANAGER_DATA_PORT_KEY, dataPort);
    +				config.setInteger(TaskManagerOptions.NETWORK_REQUEST_BACKOFF_INITIAL, 100);
    +				config.setInteger(TaskManagerOptions.NETWORK_REQUEST_BACKOFF_MAX, 200);
    +				config.setString(ConfigConstants.TASK_MANAGER_LOG_PATH_KEY, "/i/dont/exist");
    +
    +				taskManager = TestingUtils.createTaskManager(
    +					system,
    +					jobManager,
    --- End diff --
    
    maybe `ActorRef.noSender()` is enough here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message