OOTB hybris ant modulegen
generates accelerator with integration tests, which fails if default language of host operation system is not english.
CheckoutWithExternalTaxesIntegrationTest
, DefaultSimpleSuggestionServiceIntegrationTest
, DefaultSimpleSuggestionFacadeIntegrationTest
tests will fail while impex import, with errors like:
|
|
The problem is that MasterTenant
and SlaveTenant
uses different approaches to set default locale. SlaveTenant
gets locale from current operation system settings and MasterTenant
uses Locale.getDefault()
to get locale. There is no direct way to say SlaveTenant
which language to use, the only available way is to use Reflection to put desired value. To resolve issue with default integration tests was created ServicelayerLocaleFreeTest
interface.
|
|
To fix OOTB integration tests just add to test ServicelayerLocaleFreeTest
interface and in setUp()
method change locale to english with method changeJunitTenantDefaultLocale(Locale.ENGLISH)
.
For example, DefaultSimpleSuggestionServiceIntegrationTest
after changes will look like:
|
|