[ 
https://issues.apache.org/jira/browse/SOLR-7598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14559965#comment-14559965
 ] 

Hoss Man commented on SOLR-7598:
--------------------------------

Ishan: feedback on patch...

1) i don't see the value in making every testcase have the same "if" block in 
it -- why not just have that in the test util class?
2) i'm not sure how valuable the "savedLocale" behavior in 
SaslZkACLProviderTest is, but if we're going to do it in that test, we should 
do it in every similarly affected test -- the alternative being to simply 
"assume()" we're not in an affected locale and skip the test if we are

i would suggest making "brokenLanguagesWithMiniKdc" array private and replace 
it's usage with something like this...

{code}
/** 
 *returns the currently set locale, and overrides it with {@link Locale#US} if 
it's 
 * currently something MiniKdc can not handle
 *
 * @see Locale#setDefault
 */
public static final Locale overrideLocaleIfNotSpportedByMiniKdc() {
  Locale old = Locale.getDefault();
  if (brokenLanguagesWithMiniKdc.contains(Locale.getDefault().getLanguage())) {
    Locale.setDefault(Locale.US);
  }
  return old;
}
{code}

...and then in every test...

{code}
// setup
savedLocale = KerberosTestUtil.overrideLocaleIfNotSpportedByMiniKdc();

//tearDown
Locale.setDefault(savedLocale);
{code}

make sense?

----

FWIW: I had forgotten about SOLR-7183 .. probably makes sense to resolve this 
issue as a dup and track this work there.

> Minikdc is broken for some locales
> ----------------------------------
>
>                 Key: SOLR-7598
>                 URL: https://issues.apache.org/jira/browse/SOLR-7598
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Ishan Chattopadhyaya
>            Priority: Minor
>         Attachments: SOLR-7598.patch, SOLR-7598.patch
>
>
> As discovered for SOLR-6915 and reported by [~hossman] in SOLR-7468, certain 
> locales are not working with Hadoop's minikdc, possibly due to incorrect date 
> strings generated.
> In this issue, I want to refactor the logic to skip such locales to one 
> place, and filter out by the locale's language instead of filtering out by 
> every sub-locale.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to