Openfire xmppserver unitary tests failing because of Locale


When running the unitary tests of Openfire xmppserver with Maven some of them are failing because my computer language is French and the tests are expecting some values to be displayed in English.

Those tests are :

[ERROR]   StringUtilsTest.testElapsedTimeInDays:99
Expected: is "1 day"
     but: was "1 jour"
[ERROR]   StringUtilsTest.testElapsedTimeInHours:92
Expected: is "1 hour"
     but: was "1 heure"
[ERROR]   StringUtilsTest.testElapsedTimeInMinutes:86
Expected: is "1 minute, 1 second, 1 ms"
     but: was "1 minute, 1 seconde, 1 ms"
[ERROR]   StringUtilsTest.testElapsedTimeInSeconds:78
Expected: is "1 second"
     but: was "1 seconde"
[ERROR]   SystemPropertyTest.willCreateAListOfDurationProperties:498
Expected: is "1 hour,0 ms"
     but: was "1 heure,0 ms"

As a solution I added inside the xmppserver pom.xml the following line to specify the Locale of the JVM when running the tests (in Openfire/xmppserver/pom.xml) :


The whole configuration of surefire is like this now :


I think it would be nice to add this in master branch of openfire xmppserver so the tests will be okay whichever the locale of the computer.

Thanks, are you able to submit a Pull Request with this change?

Yes I should be able to do this tomorrow.

Mention OF-1713 in your PR title.