You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Erik Holstad <er...@gmail.com> on 2009/05/20 01:24:31 UTC
Where to put test code?
When looking at the test files today there are some cases where the we have
multiple test files for one src file, and also some cases where we don't
have a matching src class at all.
I was thinking that it might be good to have as close to a 1 to 1 ration as
possible, for example I was thinking that all methods it HRegion should only
be tested in TestHRegion.
It would be easier to find the test code you are looking for and since all
methods are testing the same class it will be easier to share code between
the different tester methods.
Thoughts? Comments?
RE: Where to put test code?
Posted by "Jim Kellerman (POWERSET)" <Ji...@microsoft.com>.
+1
What is there is legacy (pre several refactorings) or was slapped
into some package because it made the imports easier.
As for the tests which don't match a src at all, some are framework
HBaseTestCase, HBaseClusterTestCase, MiniXXXCluster, etc. and some
are there because it was very difficult to test some classes in
isolation.
---
Jim Kellerman, Powerset (Live Search, Microsoft Corporation)
> -----Original Message-----
> From: Erik Holstad [mailto:erikholstad@gmail.com]
> Sent: Tuesday, May 19, 2009 4:25 PM
> To: hbase-dev@hadoop.apache.org
> Subject: Where to put test code?
>
> When looking at the test files today there are some cases where the
> we have
> multiple test files for one src file, and also some cases where we
> don't
> have a matching src class at all.
> I was thinking that it might be good to have as close to a 1 to 1
> ration as
> possible, for example I was thinking that all methods it HRegion
> should only
> be tested in TestHRegion.
> It would be easier to find the test code you are looking for and
> since all
> methods are testing the same class it will be easier to share code
> between
> the different tester methods.
>
> Thoughts? Comments?