[ https://issues.apache.org/jira/browse/GOBBLIN-2218?focusedWorklogId=978711&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-978711 ]
ASF GitHub Bot logged work on GOBBLIN-2218: ------------------------------------------- Author: ASF GitHub Bot Created on: 13/Aug/25 11:18 Start Date: 13/Aug/25 11:18 Worklog Time Spent: 10m Work Description: abhishekmjain commented on code in PR #4130: URL: https://github.com/apache/gobblin/pull/4130#discussion_r2273040627 ########## gobblin-service/src/test/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobSchedulerTest.java: ########## @@ -120,6 +117,70 @@ public void testIsNextRunWithinRangeToSchedule() { } + /** + * Test that demonstrates the NullPointerException issue in GobblinServiceJob.executeImpl + * when getNextFireTime() returns null for a one-time scheduled flow. + */ + @Test + public void testGobblinServiceJobExecuteImplWithNullNextFireTime() + throws Exception { + // Create a mock JobExecutionContext + org.quartz.JobExecutionContext mockContext = mock(org.quartz.JobExecutionContext.class); + org.quartz.JobDetail mockJobDetail = mock(org.quartz.JobDetail.class); + org.quartz.JobDataMap mockJobDataMap = mock(org.quartz.JobDataMap.class); + org.quartz.Trigger mockTrigger = mock(org.quartz.Trigger.class); + + // Mock the job detail and data map + when(mockContext.getJobDetail()).thenReturn(mockJobDetail); + when(mockContext.getTrigger()).thenReturn(mockTrigger); + when(mockJobDetail.getJobDataMap()).thenReturn(mockJobDataMap); + when(mockJobDetail.getKey()).thenReturn(new org.quartz.JobKey("testFlow", "testGroup")); + + // Mock the job data map contents + Properties jobProps = new Properties(); + jobProps.setProperty(ConfigurationKeys.FLOW_NAME_KEY, "testFlow"); + jobProps.setProperty(ConfigurationKeys.FLOW_GROUP_KEY, "testGroup"); + jobProps.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY, "0"); Review Comment: nit: setting `ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY` is not needed right? Issue Time Tracking ------------------- Worklog Id: (was: 978711) Time Spent: 40m (was: 0.5h) > Handle single schedule jobs failures > ------------------------------------ > > Key: GOBBLIN-2218 > URL: https://issues.apache.org/jira/browse/GOBBLIN-2218 > Project: Apache Gobblin > Issue Type: Task > Reporter: Vaibhav Singhal > Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)