You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test failure: com.vrem.wifianalyzer.wifi.band.WifiChannelCountryTest.testFindCorrectlyPopulatesCountryCodeAndName fails depending on the OS language
#358
Closed
jswolf19 opened this issue
Oct 2, 2021
· 4 comments
I'm getting a failure on the test testFindCorrectlyPopulatesCountryCodeAndName, specifically the assertion that expected.displayCountry does not equal actual.countryName(expected).
I'm not sure what is expected with this assertion (or why it is necessary to test), nor do I know why it does not behave as expected in my environment.
I'm running Windows 10 20H2 19042.1266, android studio 2020.3.1 Patch 2, adoptopenjdk 11.0.12.7-hotspot
The text was updated successfully, but these errors were encountered:
It seems that my OS language being Japanese is also relevant. When I switch it to English, the test passes.
jswolf19
changed the title
Test failure: com.vrem.wifianalyzer.wifi.band.WifiChannelCountryTest.testFindCorrectlyPopulatesCountryCodeAndName
Test failure: com.vrem.wifianalyzer.wifi.band.WifiChannelCountryTest.testFindCorrectlyPopulatesCountryCodeAndName fails depending on the OS language
Oct 2, 2021
Leave it as is. While not what I would prefer (as I'm affected by this), it would seem that either current contributors are not affected, or they don't consider it an issue.
Remove the assertion. Only a guess, but it's likely just there to show that the country name is in the locale provided and not the display locale.
Change the expected value to expected.getDisplayCountry(Locale.ENGLISH).
Use Locale.setDefault(Locale.ENGLISH) to enforce that the display locale is not dependent on the environment. If tests are done in parallel, this could cause trouble elsewhere as this is changing global state.
I'm getting a failure on the test
testFindCorrectlyPopulatesCountryCodeAndName
, specifically the assertion thatexpected.displayCountry
does not equalactual.countryName(expected)
.I'm not sure what is expected with this assertion (or why it is necessary to test), nor do I know why it does not behave as expected in my environment.
I'm running Windows 10 20H2 19042.1266, android studio 2020.3.1 Patch 2, adoptopenjdk 11.0.12.7-hotspot
The text was updated successfully, but these errors were encountered: