Support disabling Locale randomization as part of Lucene test framework [LUCENE-8009]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
The Lucene test framework randomizes the Locale configuration to test the software in different locale settings.
https://github.com/apache/lucene-solr/blob/e2521b2a8baabdaf43b92192588f51e042d21e97/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java#L206-L209
While this is a very good practice from engineering perspective, it causes issues when the Lucene/Solr test framework is used with third-party components which may have issues working with a subset of locale settings. e.g. for Solr/Sentry integration ([SENTRY-1475](https://issues.apache.org/jira/browse/SENTRY-1475)), we are using Solr test framework to test the sentry authorization plugin for Solr. For unit-testing, it uses Apache Derby. We have found multiple cases when derby fail to initialize for a locale configured by Solr test framework. This causes tests to fail and create a confusion with respect to the quality of the integration source-code. Since the Derby failures are not related to Solr/Sentry integration, we would like to avoid such nasty surprises by suppressing the locale randomization. This is similar to the way we suppress Solr SSL configuration (`@SolrTestCaseJ4`.SuppressSSL).
Please refer to discussion on dev mailing list for more context,
http://lucene.472066.n3.nabble.com/Solr-test-framework-Locale-randomization-td4359671.html
---
Migrated from [LUCENE-8009](https://issues.apache.org/jira/browse/LUCENE-8009) by Hrishikesh Gadre (@hgadre), updated Oct 25 2017
Contributor guide
Research direction
Start in lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java at lines 206-209, then trace the existing @SolrTestCaseJ4.SuppressSSL mechanism for a comparable opt-out. Done means the test framework provides a way to suppress Locale randomization for integrations that need a stable locale, without changing the default randomized behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- internationalization, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100