ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

HBase: Unit Testing Applications

And the problem: Classes in other modules are dependent on interfaces of the db module which we can easily mock and have testable instances. But the classes in db module are mostly dependent on HTable’s which is not that easy to mock. Let me rephrase that: They are everything but easy in terms of testing. Trying to stub some methods usually leads writing the whole infrastructure so don’t try to even go there.

[…]

And my solution: If my dependency is only to an HTable i should be able to extend and override it’s methods like put/get/delete/getScanner creating a MockHTable and call it a day. But i knew it wasn’t that easy to override that methods.

Wondering if ☞ Mockito wouldn’t help here though.

Original title and link: HBase: Unit Testing Applications (NoSQL databases © myNoSQL)

via: http://agaoglu.tumblr.com/post/1254694314/unit-testing-hbase-applications