Skip to content

Commit

Permalink
kie-kogito-runtimes-3780: Disable the ADJUST_DATES_TO_CONTEXT_TIME_ZO…
Browse files Browse the repository at this point in the history
…NE jackson feature in the jobs service api default deserializer
  • Loading branch information
wmedvede committed Nov 15, 2024
1 parent adfe488 commit 0f200c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ private static ObjectMapper buildObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper()
.registerModule(new JavaTimeModule())
.registerModule(JsonFormat.getCloudEventJacksonModule())
.disable(com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
.disable(com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.disable(com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
registerDescriptors(objectMapper);
return objectMapper;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private static void assertCreateJobEvent(JobCloudEvent<?> result) {

assertThat(job.getSchedule()).isInstanceOf(TimerSchedule.class);
TimerSchedule schedule = (TimerSchedule) job.getSchedule();
assertThat(schedule.getStartTime()).isEqualTo(SCHEDULE_START_TIME);
assertThat(schedule.getStartTime()).hasToString(SCHEDULE_START_TIME.toString());
assertThat(schedule.getRepeatCount()).isEqualTo(SCHEDULE_REPEAT_COUNT);
assertThat(schedule.getDelay()).isEqualTo(SCHEDULE_DELAY);
assertThat(schedule.getDelayUnit()).isEqualTo(SCHEDULE_DELAY_UNIT);
Expand Down

0 comments on commit 0f200c4

Please sign in to comment.