You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Pan, Thomas" <th...@ebay.com> on 2012/05/24 08:52:06 UTC

Some thoughts on freaky unit tests

A small take-away from today's stackathon after discussing freaky unit tests with Jonathon, Nicolas, Stack, and Ted as I bumped into them, which fail from time to time, particularly when I run all the tests. We've just covered two small cases:

  1.  When all test suites are running in the same JVM, if different test suites require different configuration of the same singleton object, most of the time, only one test suite could succeed.
  2.  When a piece of testing code issues some action, such as splitting a region, to HBase, it will take time to finish. Most time, it is quick. Sometimes, it takes a while. The safer way is to make sure all the transactions related to the action really finish before verify the result of the action. Nicolas showed me the piece of code to get the information under the mini cluster setup. I am asking Stack on how to do that by querying zookeeper directly.

$0.02,
Thomas