Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> Mocking classes for unit tests Was: asynchbase-1.2.0-rc1 is available for download


Copy link to this message
-
Re: Mocking classes for unit tests Was: asynchbase-1.2.0-rc1 is available for download
On Wed, Feb 22, 2012 at 9:23 AM, Ted Yu <[EMAIL PROTECTED]> wrote:
> Benoit's comment is directly related to our practice, especially when we
> add new methods which are only called by unit tests.

I didn't dare to say it, but now that you do… :P

HBase exposes a TON of implementation details in public APIs.  Makes
things harder to refactor because you don't know if anyone out there
is relying on this method or extending that class.

Mocking out things that are hidden is certainly a bit harder than
calling into a public API javadoced as "for test only", but if it
keeps the APIs clean, then I think it's worthwhile.

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB