Skip to content

Commit 485af9e

Browse files
albertzaharovitstvernum
authored andcommitted
[Security][Tests] Azeri(Turkish) locale tripps opensaml dependency
(cherry picked from commit fb8adb4)
1 parent cee1ef5 commit 485af9e

File tree

1 file changed

+3
-2
lines changed
  • x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml

1 file changed

+3
-2
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlTestCase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ public static void setupSaml() throws Exception {
4646
Logger logger = Loggers.getLogger(SamlTestCase.class);
4747
if (isTurkishLocale()) {
4848
// See: https://github.com/elastic/x-pack-elasticsearch/issues/2815
49-
logger.warn("Attempting to run SAML test on turkish locale, but that breaks OpenSAML. Switching to English.");
49+
logger.warn("Attempting to run SAML test on turkish-like locale, but that breaks OpenSAML. Switching to English.");
5050
restoreLocale = Locale.getDefault();
5151
Locale.setDefault(Locale.ENGLISH);
5252
}
5353
SamlUtils.initialize(logger);
5454
}
5555

5656
private static boolean isTurkishLocale() {
57-
return Locale.getDefault().getLanguage().equals(new Locale("tr").getLanguage());
57+
return Locale.getDefault().getLanguage().equals(new Locale("tr").getLanguage())
58+
|| Locale.getDefault().getLanguage().equals(new Locale("az").getLanguage());
5859
}
5960

6061
@AfterClass

0 commit comments

Comments
 (0)