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

Mingliang Liu commented on HADOOP-13375:
----------------------------------------

The v3 patch looks good overall to me.

This turns out a non-trivial fix for the test. My last concern is about the 
{code}
624         waitForGroupCounters(groups, 3, 2, 0, 0);
625
626         // After 120ms all should have completed running
627         waitForGroupCounters(groups, 0, 0, 5, 0);
{code}
If the background reload threads run really fast (and the main test thread is 
preempted somehow), is it possible that the main test thread misses the first 
point of condition and fails? If true, we can:
# coordinate the maint test thread and the 
{{FakeGroupMapping#delayIfNecessary()}} using latch or barrier
# or simply to increase the delay interval 
{{FakeGroupMapping.setGetGroupsDelayMs(40);}} and the time out in 
{{waitForGroupCounters()}} so that the chance of failure is largely reduced.

> o.a.h.security.TestGroupsCaching.testBackgroundRefreshCounters seems flaky
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-13375
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13375
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security, test
>    Affects Versions: 2.8.0
>            Reporter: Mingliang Liu
>            Assignee: Weiwei Yang
>         Attachments: HADOOP-13375.001.patch, HADOOP-13375.002.patch, 
> HADOOP-13375.003.patch
>
>
> h5. Error Message
> bq. expected:<1> but was:<0>
> h5. Stacktrace
> {quote}
> java.lang.AssertionError: expected:<1> but was:<0>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at org.junit.Assert.assertEquals(Assert.java:555)
>       at org.junit.Assert.assertEquals(Assert.java:542)
>       at 
> org.apache.hadoop.security.TestGroupsCaching.testBackgroundRefreshCounters(TestGroupsCaching.java:638)
> {quote}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to