Ensure supported locale outside of Entitlements check#143405
Ensure supported locale outside of Entitlements check#143405mamazzol merged 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
mark-vieira
left a comment
There was a problem hiding this comment.
Seems fine to me. Are we certain that the TestEntitlementRule will always run after whatever sets the random locale?
|
ESTestCase has ensureSupportedLocale as |
Right, my point being that the randomly chosen locale needs to have already been set. I'm not even certain where that happens. |
My understanding is that it's randomly set by LuceneTestCase which is the parent class of ESTestCase. The order should be guaranteed by the hierarchy. |
* Ensure supported locale in test around entitlements
* Ensure supported locale in test around entitlements
* Ensure supported locale in test around entitlements
…cations * upstream/main: (56 commits) Mute org.elasticsearch.compute.lucene.read.ValueSourceReaderTypeConversionTests testLoadAll elastic#143471 [DOCS] Fix ES|QL function and commands lists versioning metadata (elastic#143402) Fix MMROperatorTests (elastic#143453) Fix CSV-escaped quotes in generated docs examples (elastic#143449) Fix SQL client parsing of array header values (elastic#143408) ESQL: Add extended distribution tests and fault injection for external sources (elastic#143420) ESQL: Fix datasource test failures on Windows and FIPS (elastic#143417) Add circuit breaker for query construction to prevent OOM from automaton-based queries (elastic#142150) Cleanup SpecIT logging configuration (elastic#143365) ESQL: Prune unused regex extract nodes in optimizer (elastic#140982) Ensure supported locale outside of Entitlements check (elastic#143405) feat(es|ql): add dense_vector support in coalesce (elastic#142974) [Test] Unmute SnapshotStressTestsIT (elastic#143359) Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.LookupJoinWithCoalesceFilterOnRight} elastic#143443 Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyOnTheLookupIndex} elastic#143442 ESQL: Fix CCS exchange sink cleanup (elastic#143325) Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyOnTheLookupIndexAfterStats} elastic#143434 Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyFromRow} elastic#143432 Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:k8s-timeseries.Datenanos_derivative_compared_to_rate} elastic#143431 Mute org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT test {yaml=search.retrievers/result-diversification/10_mmr_result_diversification_retriever/Test MMR result diversification single index float type} elastic#143430 ...
* Ensure supported locale in test around entitlements
* Ensure supported locale in test around entitlements
Locale.setDefault(Locale.ENGLISH)can be called from insideESTestCase.ensureSupportedLocale().In tests that:
The code wants to set the locale to English and runs into an entitlement exception
As this is a need for the test, we call
ESTestCase.ensureSupportedLocale()a bit early in the stack when the entitlements for test code are not yet enforced.Closes: #143323