[ 
https://issues.apache.org/jira/browse/HBASE-25024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Reid Chan updated HBASE-25024:
------------------------------
    Description: 
Sometimes threads could finish faster before interrupt() gets called. 
{code}
      // ...
      t.start();
    }
    int expectedNoExNum = nbThread / 2;

    for (int i = 0; i < nbThread / 2; i++) {
      if (threads.get(i).getState().equals(Thread.State.TERMINATED)) {
        expectedNoExNum--;
      }
      threads.get(i).interrupt();
    }
{code}

So this test could get failed sometimes.

  was:
Sometimes threads could finish faster before interrupt() gets called. 
{code}
      // ...
      t.start();
    }
    int expectedNoExNum = nbThread / 2;

    for (int i = 0; i < nbThread / 2; i++) {
      if (threads.get(i).getState().equals(Thread.State.TERMINATED)) {
        expectedNoExNum--;
      }
      threads.get(i).interrupt();
    }
{code}


> [Flake Test][branch-1] TestClientOperationInterrupt#testInterrupt50Percent
> --------------------------------------------------------------------------
>
>                 Key: HBASE-25024
>                 URL: https://issues.apache.org/jira/browse/HBASE-25024
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Reid Chan
>            Priority: Minor
>             Fix For: 1.7.0
>
>
> Sometimes threads could finish faster before interrupt() gets called. 
> {code}
>       // ...
>       t.start();
>     }
>     int expectedNoExNum = nbThread / 2;
>     for (int i = 0; i < nbThread / 2; i++) {
>       if (threads.get(i).getState().equals(Thread.State.TERMINATED)) {
>         expectedNoExNum--;
>       }
>       threads.get(i).interrupt();
>     }
> {code}
> So this test could get failed sometimes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to