Skip to content

Fix #4988. Handle Maven Surefire locale and timezone#5061

Merged
kcondon merged 2 commits intoIQSS:developfrom
poikilotherm:4988-fix-locale-tz-maven-builds
Sep 17, 2018
Merged

Fix #4988. Handle Maven Surefire locale and timezone#5061
kcondon merged 2 commits intoIQSS:developfrom
poikilotherm:4988-fix-locale-tz-maven-builds

Conversation

@poikilotherm
Copy link
Contributor

Please merge 😃

Related Issues

Pull Request Checklist

… properties, so users around the globe all use the same and tests don't fail.
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks great but we should probably reword a bit what we say about timezone in the dev guide.


If you installed Maven instead of Netbeans, run ``mvn package``.

NOTE: Do you use a locale different than ``en_US.UTF-8`` and a timezone different to ``UTC`` on your development machine?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little confusing to me because the core development team at @IQSS is not in the "UTC" timezone. We're in Boston (well, across the river in Cambridge) so it's Eastern Time Zone which I guess is either "EST" or "EDT" according to https://en.wikipedia.org/wiki/Eastern_Time_Zone . Maybe this could say something like "we set our tests to UTC" for testing?

<configuration>
<!-- testsToExclude come from the profile-->
<excludedGroups>${testsToExclude}</excludedGroups>
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up that we pass some command line arguments in the .travis.yml file in the root of the repo. Tests are passing just find at https://travis-ci.org/IQSS/dataverse without any timezone, language, or region specified but I just thought I'd mention this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course this works... 😉
Travis CI by default uses locale en_US.UTF-8 and sets TZ to UTC according to some stuff on StackOverflow and Github issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, did you see my comment above on dev-environment.rst ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yepp - was AFK for a break... 😉 Had some 🇨🇳 dinner.

@poikilotherm
Copy link
Contributor Author

Hi @pdurbin I just made some changes to the text. Maybe you can review again and merge or reply 😄
Thx!

@pdurbin
Copy link
Member

pdurbin commented Sep 17, 2018

@poikilotherm hi! I don't do the testing or merging but this pull request looks good to me as of 8d3eb8e so I moved it to QA. Thanks!

@poikilotherm
Copy link
Contributor Author

@pdurbin You're welcome! 😸

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as of 8d3eb8e.

@pameyer
Copy link
Contributor

pameyer commented Sep 17, 2018

Overall looks good. I haven't checked, but it would seem to make sense to make sure that run-test-suite.sh doesn't need changes to pick up (or stay in sync with) the argLine changes.

"haven't checked" meaning I haven't run it in this branch - so it's possible that no changes are necessary.

@kcondon kcondon merged commit cb07a1b into IQSS:develop Sep 17, 2018
@poikilotherm
Copy link
Contributor Author

About the test suite script: it just calls Maven...

The Surefire argLine arguments added in the PR are used by the plug-in when starting the JVM to run the tests. This is necessary as system properties are read to late to apply the settings (see various Maven tutorials and Surefire bugtracker where I got this stuff from).

Thus I don't see any necessity to adjust the scripts Maven arguments.

@poikilotherm
Copy link
Contributor Author

I just got aware that I broke test coverage reporting with my commit, because the cmd line arguments from JaCoCo were ditched from the surefire-plugin.

I will fix this in #5071, too. SORRY!!! 😿

poikilotherm added a commit to poikilotherm/dataverse that referenced this pull request Sep 20, 2018
…{argLine}' in surefire plugin argLine option.
@pdurbin
Copy link
Member

pdurbin commented Sep 20, 2018

Oh! Thanks for catching this. I know we're only at 16% code coverage but I like how https://coveralls.io/github/IQSS/dataverse?branch=develop show's that code coverage is increasing over time, and yes, we'd like this reporting to continue working:

screen shot 2018-09-20 at 7 51 46 am

poikilotherm added a commit to poikilotherm/dataverse that referenced this pull request Sep 20, 2018
…{argLine}' in surefire plugin argLine option.
poikilotherm added a commit to poikilotherm/dataverse that referenced this pull request Sep 24, 2018
…{argLine}' in surefire plugin argLine option.
poikilotherm added a commit to poikilotherm/dataverse that referenced this pull request Sep 25, 2018
…{argLine}' in surefire plugin argLine option.
@poikilotherm poikilotherm deleted the 4988-fix-locale-tz-maven-builds branch November 29, 2018 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants