Skip to content

Commit

Permalink
Fix test that breaks in Jackson 2.15.x and higher
Browse files Browse the repository at this point in the history
* Normalize the ZoneId so the test passes
* Remove Slf4j annotation at top-level since not being used

See the following for more details on the ZoneId issue:
kiwiproject/kiwi-bom#655 (comment)

Closes #259
  • Loading branch information
sleberknight committed Jul 24, 2023
1 parent 192076e commit 9f3f40a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

@DisplayName("DropwizardClients")
@ExtendWith(DropwizardExtensionsSupport.class)
@Slf4j
class DropwizardClientsTest {

@Path("/dropwizardClients")
Expand Down Expand Up @@ -172,14 +171,16 @@ void shouldUseCustomizedObjectMapperToWriteTimestampsAsMillis() {
}

private static Person newSamplePerson(Long id) {
var utcZoneId = ZoneId.of("UTC").normalized();

return Person.builder()
.id(id)
.firstName("Alice")
.lastName("Smith")
.email("[email protected]")
.age(42)
.createdAt(ZonedDateTime.of(2020, 3, 31, 12, 0, 0, 0, ZoneId.of("UTC")))
.updatedAt(ZonedDateTime.of(2020, 11, 15, 14, 30, 0, 0, ZoneId.of("UTC")))
.createdAt(ZonedDateTime.of(2020, 3, 31, 12, 0, 0, 0, utcZoneId))
.updatedAt(ZonedDateTime.of(2020, 11, 15, 14, 30, 0, 0, utcZoneId))
.build();
}
}

0 comments on commit 9f3f40a

Please sign in to comment.