-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Test always fails in local env #2979
Comments
@EmmanuelMess Can you run the test standalone from within Android Studio? Also, try get a jacoco test report. It should contain more info on what had gone wrong for me to fix this. |
I cannot run the test from Android Studio either. It might be a timezone issue.
|
@EmmanuelMess Sounds like timezone problem on timestamp assertion differences. Same thing happened on zip tests earlier, so I think should be about the same problem. Will advise after further inspection. |
Made an initial test with separate VM running Debian 11, and timezone deliberately set to GMT-3, i.e. the same timezone as in Buenos Aires😎 gradle build from the command line ran ok. Will check with tests ran from within IDE. May involve setting TZ environment variable at test run configuration. |
Ran from within Debian VM of timezone = Buenos Aires again, running So perhaps this is how to solve your problem - set environment variable |
I dont understand why that fact that I run it under another timezone changes the result of the test, isn't everything converted to UTC timezone? |
@EmmanuelMess Zip and rar formats are still using DOS timestamps, which is timezone sensitive. Things got a little tricky when verifying their timestamps, hence setting timezone to UTC to hopefully reduce the impact of the problem. |
Can't the timezone be set in code for this test? |
Fixes TeamAmaze#2979. So tests can be run without using gradle.
Running
:app:testPlayDebugUnitTest
always fails with:The text was updated successfully, but these errors were encountered: