You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Marton Elek (Jira)" <ji...@apache.org> on 2019/11/28 10:14:00 UTC

[jira] [Created] (HDDS-2639) TestTableCacheImpl is flaky

Marton Elek created HDDS-2639:
---------------------------------

             Summary: TestTableCacheImpl is flaky
                 Key: HDDS-2639
                 URL: https://issues.apache.org/jira/browse/HDDS-2639
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
            Reporter: Marton Elek


Run(master): [https://github.com/apache/hadoop-ozone/runs/324342299]

 
{code:java}
-------------------------------------------------------------------------------
Test set: org.apache.hadoop.hdds.utils.db.cache.TestTableCacheImpl
-------------------------------------------------------------------------------
Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.955 s <<< FAILURE! - in org.apache.hadoop.hdds.utils.db.cache.TestTableCacheImpl
testPartialTableCacheWithOverrideAndDelete[0](org.apache.hadoop.hdds.utils.db.cache.TestTableCacheImpl)  Time elapsed: 0.039 s  <<< FAILURE!
java.lang.AssertionError: expected:<2> but was:<6>
	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.hdds.utils.db.cache.TestTableCacheImpl.testPartialTableCacheWithOverrideAndDelete(TestTableCacheImpl.java:308)

 {code}
*How to reproduce it locally?*

Replace the last tableCache.evict call of testPartialTableCacheWithOverrideAndDelete to System.out.println(tableCache.size()).

You will see that the cache size is 2 even before the cleanup therefore the next GeneriTestUtils.waitFor is useless (it doesn't guarantee that the cleanup is finished).

*Fix:*

I propose to call the cleanup sync with using the Impl class instead of the interface. It simplifies the test but still validates the behavior.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org