Skip to content

Hibernate ORM and Spring Data tests failing with out-by-one error when run on Mac in North American timezone #28035

Open

Description

Describe the bug

I can’t decide if this is a test issue, or an implementation issue, but I’m raising a defect to track the investigation (and track the disabling of the tests on Mac CIs in #27156, which we will want to reverse once this is sorted out).

A number of tests which check author.dob are failing with an out-by-one error, on our Mac GitHub runner. I assume the issue is a timezone one, since taking five hours off a date (as in UTC-5) can have the effect of going back a day. I have confirmed that I can reproduce on my Mac if I set the timezone to Chicago.

2022-09-17T06:31:57.7517920Z java.lang.AssertionError: 
2022-09-17T06:31:57.7518080Z 1 expectation failed.
2022-09-17T06:31:57.7527070Z JSON path author.dob doesn't match.
2022-09-17T06:31:57.7527270Z Expected: is "1821-11-11"
2022-09-17T06:31:57.7527420Z   Actual: 1821-11-10
```



I can’t explain why this only affects the Mac runner, and not the other US-hosted runners. (I’ve checked, and the timestamps in the log are the same as the ubuntu runners which pass fine.)





These are the affected tests:

📦 integration-tests/hibernate-orm-rest-data-panache
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldGetAuthor line 51 -
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldGetBookHal line 82 -
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldGetBook line 70 -
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldListAuthors line 97 -
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldListBooksHal line 134 -
✖ io.quarkus.it.hibernate.orm.rest.data.panache.HibernateOrmRestDataPanacheTest.shouldListBooks line 109 -

📦 integration-tests/jackson
✖ io.quarkus.it.jackson.DateDeserializerPojoResourceTest.testSqlDate line 41 -

📦 integration-tests/spring-data-rest
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldGetAuthor line 43 -
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldGetBookHal line 67 -
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldGetBook line 55 -
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldListAuthors line 82 -
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldListBooksHal line 106 -
✖ io.quarkus.it.spring.data.rest.SpringDataRestTest.shouldListBooks line 94 -

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

To reproduce, I think you will need a Mac? But probably not specifically an M1?

Change the timezone to something West of Greenwich, like a North American or Brazilian time (hi, @gastaldi :) ).

Then

mvn verify -f integration-tests/hibernate-orm-rest-data-panache

will fail.

Output of uname -a or ver

Darwin hcummins-mac 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/hibernate-ormHibernate ORMarea/springIssues relating to the Spring integrationenv/m1Impacts Apple M1 machineskind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions