Skip to content

Commit

Permalink
Tests: Skip bwc analysis tests if using turkish or azuri locale.
Browse files Browse the repository at this point in the history
On 1.x, the pre built pattern analyzer has issues with turkish and azuri
locales.  We should just skip the test if using these locales.  On
master, the issue is fixed by only using the Elasticsearch version,
which avoids the default locale issue lucene's PatternAnalyzer is
susceptable to.

closes #8492
  • Loading branch information
rjernst committed Nov 20, 2014
1 parent 6e2e9f1 commit 7b483bc
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -50,8 +50,11 @@ public class BasicAnalysisBackwardCompatibilityTests extends ElasticsearchBackwa
*/
@Test
public void testAnalyzerTokensAfterUpgrade() throws IOException, ExecutionException, InterruptedException {
// certain analyzers, namely PatternAnalyzer, have had issues with turkish and azuri
assumeFalse("Do not use turkish and azuri locales",
Locale.getDefault().getLanguage().equals("tr") || Locale.getDefault().getLanguage().equals("az"));

int numFields = randomIntBetween(PreBuiltAnalyzers.values().length, PreBuiltAnalyzers.values().length * 10);
StringBuilder builder = new StringBuilder();
String[] fields = new String[numFields * 2];
int fieldId = 0;
for (int i = 0; i < fields.length; i++) {
Expand Down

0 comments on commit 7b483bc

Please sign in to comment.