-
Notifications
You must be signed in to change notification settings - Fork 488
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
maven build fails because test NewDTAFileReaderTest.testDates() fails #4988
Comments
@aseeland hi! Thanks for the bug report. If you look at https://travis-ci.org/IQSS/dataverse/branches you can see that we are not (thankfully!) getting that build error. Everything is green: In pull request #4483 we added Also, when you say you're trying to build 4.9.2 are you saying you're starting at that tag, which is commit 4ad7bf5 or are you saying you're trying to build the latest from the "develop" branch? If you could let us know which commit you are on, it would be helpful. Thanks! |
Hi @pdurbin . Yes, maybe the problem is cause by wrong locale settings... When I check my calendar, the 4th of november is a Sunday, and the 5th is a Monday. So, maybe it is a problem with the definition of the first day of the week? Yes, wtih v4.9.2 I mean the tag (commit 4ad7bf5). Thank you for your help! |
Hello again. I think the problem might be that the calendar that reads the STATA files is set to GMT, but the readFileToString-method in the unit test interprets the dates with the locale time zone. |
@aseeland good troubleshooting. I can confirm that on the v4.9.2 tag when I run...
... I get the same error:
I'm not sure how to make the test work for both Do you feel like making a pull request? Just yesterday we merged pull request #4989 and you could follow the instructions in the dev guide to annotate the failing test as "non-essential": You would make the pull request from the latest in "develop" rather than the tag you're on, as explained at http://guides.dataverse.org/en/4.9.2/developers/version-control.html#create-a-new-branch-off-the-develop-branch |
@pdurbin Do you really want a pull request where the test is annotated as "non-essential"? Can you maybe help me in thinking about the implications this timezone issue might have? |
@aseeland it's up to you if you want to make a pull request. These tests have only existed for a couple months, added in pull request #4708. Also, annotating a test as non-essential doesn't mean that it's never run. As indicated in the |
I can reproduce this bug, too and it hits even more tests on my machine with
Maybe set this to your Harvard based settings and give a hint about this in the dev docs?
Sorry, no proper reading. Anyway I suggest setting the locale in the maven file to get rid of the locale problem. Will do some research on the TZ stuff and how to fix the test... |
@poikilotherm sounds great. If you can add the right settings to |
The error in #4482 just looks like the issues I get on my machine... As the I am going to send a PR if I get the time today, otherwise on Wednesday. |
@poikilotherm great! I just dragged this issue to our new "Community Dev" column at https://waffle.io/IQSS/dataverse and assigned it to you. Thanks! If you have any questions, please let us know! |
@poikilotherm thanks for pull request #5061! I assume it's ready for code review so I dragged it over in Waffle. |
@poikilotherm hi! I just left a code review. I'm just asking about a tiny change having to do with timezones. Please let me know what you think. Thanks! |
Looks good to me as of 8d3eb8e. Moving to QA. |
…uilds Fix #4988. Handle Maven Surefire locale and timezone
…he argLine stuff from IQSS#4988 to a property.
…he argLine stuff from IQSS#4988 to a property.
…he argLine stuff from IQSS#4988 to a property.
I tried to build dataverse 4.9.2 with maven and got the following error:
The 2nd date seems to be wrong (2018-11-05 instead of 2018-11-04).
I don't use STATA, so I was not able to open the file dataverse/src/test/java/edu/harvard/iq/dataverse/ingest/tabulardata/impl/plugins/dta/dates.dta but I am wondering if you guys also get this failure.
The text was updated successfully, but these errors were encountered: