Skip to content

Commit

Permalink
Update InMemoryIngestJobTrackerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
patchwork01 committed Feb 20, 2025
1 parent 7d448cf commit 295aa8e
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,16 +499,12 @@ void shouldFailToReportOnRunWhenJobRunIdIsNotSetAtValidationAndTaskIdIsOnlySetWh
String taskId = "test-task";
Instant validationTime = Instant.parse("2022-09-22T12:00:10.000Z");
Instant startTime = Instant.parse("2022-09-22T12:00:15.000Z");
IngestJobValidatedEvent job = ingestJobAcceptedEventBuilder(validationTime).fileCount(1).build();

// When
IngestJobValidatedEvent job = ingestJobAcceptedEventBuilder(validationTime).jobRunId(null).fileCount(1).build();
tracker.jobValidated(job);
tracker.jobStarted(ingestJobStartedAfterValidationEventBuilder(job, startTime).taskId(taskId).build());

// Then
assertThat(tracker.getAllJobs(tableId))
.containsExactly(ingestJobStatus(job, validationRun(
ingestAcceptedStatus(validationTime, 1))));
// When / Then
assertThatThrownBy(() -> ingestJobStartedAfterValidationEventBuilder(job, startTime).taskId(taskId).build())
.isInstanceOf(NullPointerException.class);
}
}

Expand Down

0 comments on commit 295aa8e

Please sign in to comment.