[ https://issues.apache.org/jira/browse/GOBBLIN-1068?focusedWorklogId=417581&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-417581 ]
ASF GitHub Bot logged work on GOBBLIN-1068: ------------------------------------------- Author: ASF GitHub Bot Created on: 07/Apr/20 09:25 Start Date: 07/Apr/20 09:25 Worklog Time Spent: 10m Work Description: arjun4084346 commented on pull request #2907: [GOBBLIN-1068]Clean up cyclic logic in task cancellation URL: https://github.com/apache/incubator-gobblin/pull/2907#discussion_r404665523 ########## File path: gobblin-cluster/src/test/java/org/apache/gobblin/cluster/suite/IntegrationJobCancelSuite.java ########## @@ -20,20 +20,26 @@ import org.junit.Assert; import com.typesafe.config.Config; +import com.typesafe.config.ConfigValueFactory; + +import static org.apache.gobblin.cluster.SleepingTask.SLEEPING_TASK_SLEEP_TIME; public class IntegrationJobCancelSuite extends IntegrationBasicSuite { public static final String JOB_ID = "job_HelloWorldTestJob_1234"; public static final String TASK_STATE_FILE = "/tmp/IntegrationJobCancelSuite/taskState/_RUNNING"; public IntegrationJobCancelSuite(Config jobConfigOverrides) { - super(jobConfigOverrides); + // Put SleepingTask in long sleep allowing cancellation to happen. + super(jobConfigOverrides.withValue(SLEEPING_TASK_SLEEP_TIME, ConfigValueFactory.fromAnyRef(100))); } @Override public void waitForAndVerifyOutputFiles() throws Exception { + // SleepingTask is in an infinite sleep. The log line is printed only when a cancellation in invoked. + Assert.assertTrue(verifyFileForMessage(this.jobLogOutputFile, "Sleep interrupted")); + // If the job is cancelled, it should not have been able to write 'Hello World!' Assert.assertFalse(verifyFileForMessage(this.jobLogOutputFile, "Hello World!")); Review comment: Can we keep the deleted line. A bug was fixed and that line ensure that NPE does not happen. Yea, it can probably be replaced by Assert.assertFalse(verifyFileForMessage(this.jobLogOutputFile, "Exception")); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 417581) Time Spent: 3h (was: 2h 50m) > Clean cyclic logic in task cancellation in Gobblin Task > ------------------------------------------------------- > > Key: GOBBLIN-1068 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1068 > Project: Apache Gobblin > Issue Type: Bug > Reporter: Lei Sun > Priority: Major > Time Spent: 3h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)