[
https://issues.apache.org/jira/browse/PHOENIX-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13930080#comment-13930080
]
Gabriel Reid commented on PHOENIX-130:
--------------------------------------
[~jamestaylor] That's correct, this is just a matter of file moves and renames,
and some pom editing.
The main intention with this patch is indeed to have the long-running tests run
in a different phase, with the intention being that the build then fails fast.
As James pointed out, separating out the code makes it easy to run the
fast-running tests within an IDE as well. This is the approach that has been
used for Apache Crunch, and has worked well in that project so far.
This is also the drawback that I see with approach that is taken with HBase --
it's not fail-fast, and there's no really simple way to run all the
fast-running tests from within an IDE (which I've found a bit troublesome in
the past). One could also argue that the approach taken by HBase doesn't really
follow the "principle of least surprise", there is a relatively lengthy
introduction supplied (and needed) in the user guide [1] to explain how to
operate the test framework.
Based on working with the Crunch and HBase code bases, my personal experience
has usually been as follows (although YMMV)
* the fast-running unit tests all get run very regularly during development
* a small subset (i.e. one test class or one package containing 2 or 3 test
classes) of long-running tests gets run when working on a specific subset of
functionality that is covered by that test
* all tests generally get run before committing anything
This is another point where I feel that the HBase method of tagging tests has
limited value -- you typically want to test a specific part of the codebase
with longer-running tests, or you want to test everything. For me it's been a
much less-common situation to want to test all "medium-long" tests, regardless
of their focus.
[1] https://hbase.apache.org/book/hbase.tests.html
> Separate execution of slow (integration) tests from fast unit tests
> -------------------------------------------------------------------
>
> Key: PHOENIX-130
> URL: https://issues.apache.org/jira/browse/PHOENIX-130
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Gabriel Reid
> Attachments: PHOENIX-130.patch
>
>
> The current collection of automated unit tests and integration tests takes a
> significant amount of time to run (somewhere in the neighborhood of 90
> minutes on my machine).
> I’d like to propose that the automated tests are split up into two groups:
> * unit tests, which don’t make use of a running HBase and run quickly, and
> will be run within the maven test phase
> * integration tests, which do make use of a running HBase and run more
> slowly, and will be run within the maven integration-test phase
> This approach has the advantage that all fast-running unit tests will be run
> before the integration tests, so if there is a minor issue the build will
> fail-fast instead of first running long-running integration tests before
> failing. It also makes it possible to quickly and regularly run “mvn test”
> during development to run all unit tests in a matter of seconds.
--
This message was sent by Atlassian JIRA
(v6.2#6252)