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

Bharath Vissapragada commented on HBASE-24479:
----------------------------------------------

I think the test is racy.. (following snippet from branch-1)

{noformat}
  public void testStopStartCompaction() throws IOException {
  ...........
    thread.requestCompaction(r, store, "test", Store.PRIORITY_USER, new 
CompactionRequest(), null);
-------------> Add a sleep here and the test fails reliably <------
    assertEquals(1, thread.getLongCompactions().getActiveCount() + 
thread.getShortCompactions()
      .getActiveCount());
  }
{noformat}

The problem is that the compaction asynchronously finishes before we even poll 
for the {{activeCount}}

> Deflake TestCompaction#testStopStartCompaction
> ----------------------------------------------
>
>                 Key: HBASE-24479
>                 URL: https://issues.apache.org/jira/browse/HBASE-24479
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0-alpha-1, 2.3.0, 1.7.0
>            Reporter: Bharath Vissapragada
>            Assignee: Bharath Vissapragada
>            Priority: Major
>
> Saw this in our internal test runs. 
> {noformat}
> org.apache.hadoop.hbase.regionserver.TestCompactionWithCoprocessor.testStopStartCompaction
> Failing for the past 1 build (Since Unstable#10 )
> Took 0.72 sec.
> add description
> Error Message
> expected:<1> but was:<0>
> Stacktrace
> java.lang.AssertionError: expected:<1> but was:<0>
> {noformat}
> The test asserts can be tightened to improve this. Will follow up with a 
> patch shortly.  HBASE-23899 added some debug logging to figure out why. 



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

Reply via email to