-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startWithLoyaltyCardNoExpirySetExpiry test can fail depending on time(zone) #2124
Comments
Every now and then I get an email from someone who says setting an expiry "doesn't work". Most people don't respond when I ask them what "doesn't work" means, one person stated it "sets the wrong day". Sadly even that person didn't further respond when I asked them which day they entered and what they go and what timezone they're in. I've long suspected there was some timezone related issue there but I never had enough info to justify spending a lot of time taking a look so this test failure may actually be showing that issue. Maybe it'll help actually fix whatever is going wrong. |
In my box, Debian Sid, I can reproduce this problem between 00am and 01am each day Adding a log in the LoyaltyCardViewActivityTest.java file and running gradlew with the -d option shows the following: Running with TZ=UTC instead passes the test, with the UTC date HTH, let me know what other tests can I make |
Thanks, that's quite helpful. How are you forcing the timezone? Perhaps we can add this to the unit tests as a first step and then fix this bug from there? Having correct unit tests is always useful to ensure it gets fixed properly and won't break in the future :) |
Hi, I am doing this in the command line |
I had an odd test failure. Running the tests with
TZ=UTC
fixed it (it was indeed the 22nd in my time zone but still the 21st in UTC).The text was updated successfully, but these errors were encountered: