hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gaojinchao (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-4651) TestHCM case fails(ConcurrentModificationException might be thrown in TestHCM.testConnectionUniqueness)
Date Mon, 24 Oct 2011 01:30:32 GMT
TestHCM case fails(ConcurrentModificationException might be thrown in TestHCM.testConnectionUniqueness)

                 Key: HBASE-4651
                 URL: https://issues.apache.org/jira/browse/HBASE-4651
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.92.0
            Reporter: gaojinchao
            Priority: Minor
             Fix For: 0.92.0

looks Ted's mail
ConcurrentModificationException might be thrown in TestHCM.testConnectionUniqueness.

363     Entry<K,V> nextEntry() {
364         if (modCount != expectedModCount)
365         throw new
JavaDoc] <http://kickjava.com/2487.htm>();

Read more:

HCM uses proper synchronization when accessing HBASE_INSTANCES.

Looking at TestHCM.getValidKeyCount(), it puts values of HBASE_INSTANCES in a Set and returns
the size of the Set.

However, post HBASE-3777, the values (HConnectionImplementation's) in HBASE_INSTANCES would
be unique.

I simplified TestHCM.getValidKeyCount() by returning cache.size() directly where ConcurrentModificationException
isn't thrown.
The test passed.

Please comment on proposed simplification.

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


View raw message