[
https://jira.duraspace.org/browse/DS-1331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26541#comment-26541
]
Ivan Masár commented on DS-1331:
--------------------------------
https://github.com/DSpace/DSpace/blob/dspace-3.0-rc1/dspace-api/src/test/java/org/dspace/statistics/util/TestLocationUtils.java#L64
I think this particuar assertion should be just removed.
1) we're already testing what it does under the English locale on line 76
2) If LocationUtils.getCountryName() is not given locale explicitly, it assumes
default locale (Locale.getDefault()), which is a property set when starting
JVM. We simply cannot assume it will be C or en_US.
> testGetCountryNameString is failure
> -----------------------------------
>
> Key: DS-1331
> URL: https://jira.duraspace.org/browse/DS-1331
> Project: DSpace
> Issue Type: Bug
> Environment: *Location*: http://demo.dspace.org/
> *User-Agent*: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like
> Gecko) Chrome/22.0.1229.94 Safari/537.4
> *Screen Resolution*: 1680 x 1050
> Reporter: Keiji Suzuki
> Labels: collector-60e7afac
>
> When I did "mvn package" dspace-3.0-rc1-release at dsapce-src, the above test
> was failure.
> The report says as follows.
> -------------------------------------------------------------------------------
> Test set: org.dspace.statistics.util.TestLocationUtils
> -------------------------------------------------------------------------------
> Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.109 sec <<<
> FAILURE!
> testGetCountryNameString(org.dspace.statistics.util.TestLocationUtils) Time
> elapsed: 0.016 sec <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[United States]> but was:<[アメリカ合衆国]>
> at
> org.dspace.statistics.util.TestLocationUtils.testGetCountryNameString(TestLocationUtils.java:64)
> ---------------
> My default locale is Locale.Japanese. This failure is fixed when I changed
> the line 64 of TestLocationUtils.java
> as follows (added Locale.ENGLISH as the second parameter).
> assertEquals("United States", LocationUtils.getCountryName(
> "US", Locale.ENGLISH));
> *Reporter*: Keiji Suzuki
> *E-mail*: [mailto:[email protected]]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel