[ https://issues.apache.org/jira/browse/HBASE-6097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283637#comment-13283637 ]
Gregory Chanan commented on HBASE-6097: --------------------------------------- The issue is that this test checks that a sync happened like so: {code} assertEquals(1, HLog.getSyncOps()); {code} But in 0.92, the LogSyncer thread will sync, and increment HLog.getSyncOps(), even if there are no updates to the wal. This has been fixed in 0.94+. So, you can trigger a failure by setting hbase.regionserver.optionallogflushinterval to an extremely low value and throwing in random sleeps to the test. Possibilities for fixing: 1) Backport the work from 0.94+ that avoids syncing if there are no updates to the wal 2) Only change the test and just check that a sync ran, e.g. {code} assert(HLog.getSyncOps() > 0); {code} This makes the test a bit too accepting, because then it is possible that the syncer can sync nothing and we'd think a sync actually ran. I'll investigate some more. > TestHRegion.testBatchPut is flaky on 0.92 > ----------------------------------------- > > Key: HBASE-6097 > URL: https://issues.apache.org/jira/browse/HBASE-6097 > Project: HBase > Issue Type: Bug > Components: test, wal > Affects Versions: 0.92.1 > Reporter: Gregory Chanan > Assignee: Gregory Chanan > > If I run this test in a loop, I get failures like the following: > Error Message: > expected:<1> but was:<2> > Stack Trace: > junit.framework.AssertionFailedError: expected:<1> but was:<2> > at junit.framework.Assert.fail(Assert.java:50) > at junit.framework.Assert.failNotEquals(Assert.java:287) > at junit.framework.Assert.assertEquals(Assert.java:67) > at junit.framework.Assert.assertEquals(Assert.java:134) > at junit.framework.Assert.assertEquals(Assert.java:140) > at > org.apache.hadoop.hbase.regionserver.TestHRegion.testBatchPut(TestHRegion.java:536) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira