sv2000 commented on a change in pull request #2907: [GOBBLIN-1068]Clean up cyclic logic in task cancellation URL: https://github.com/apache/incubator-gobblin/pull/2907#discussion_r387987035
########## File path: gobblin-cluster/src/test/java/org/apache/gobblin/cluster/suite/IntegrationJobCancelSuite.java ########## @@ -40,15 +42,23 @@ ConfigurationKeys.SOURCE_CLASS_KEY, "org.apache.gobblin.cluster.SleepingCustomTaskSource", ConfigurationKeys.JOB_ID_KEY, JOB_ID, GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, Boolean.TRUE, - GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, 10L, SleepingTask.TASK_STATE_FILE_KEY, TASK_STATE_FILE)) - .withFallback(rawJobConfig); + GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, 10L, + + // Put SleepingTask in infinite sleep so that cancellation thereby ensuring cancellation to happen. + SleepingTask.TASK_STATE_FILE_KEY, TASK_STATE_FILE)) + .withFallback(rawJobConfig.withValue(SLEEPING_TASK_SLEEP_TIME, ConfigValueFactory.fromAnyRef(-1))); return ImmutableMap.of(JOB_NAME, newConfig); } + /** + * Note This verification now ties to {@link SleepingTask} which is not ideal. Review comment: Note: This verification is now tied to.... ---------------------------------------------------------------- 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 With regards, Apache Git Services