helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Calderoni (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (HELIX-77) Skip tests in default build or separate unit/integration tests
Date Mon, 01 Apr 2013 23:39:15 GMT

     [ https://issues.apache.org/jira/browse/HELIX-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Max Calderoni reopened HELIX-77:
--------------------------------


Thought i reopened this one so that i add the patches i was talking about.
If i should instead open different Jira issues, please let me know and i will.

Going to include two patches:
1) the first patch are just cleanups i ran into. Simply made plugin management and dependency
management consistent (did not introduce it, was already there, just made it consistent)

2) This is the critical one: added support for separating integration and unit tests in the
main pom (see comment lines in pom).
So now, when users issue 'mvn' (defaults to 'mvn clean install'), they would compile and run
only designated unit tests.
When users (and Jenkins i guess, from previous comments) issue a 'mvn -P integration-test'
then not only the unit tests will be run, but also the designated integration tests.

The pattern i picked for separating test types is "**/integration/**". That pattern means
that any tests under a folder named 'integration' is treated as integration tests, but any
other pattern can be used. For example, if you wanted to mark as integration tests all tests
ending with "IntegTest.java", no matter what folder they are into, then the pattern would
be:
"**/*IntegTest.java".

Note that, for this change to make sense, i had to remove my previous change in the original
patch i had submitted, where i was setting maven.test.skip.exec=true by default (I commented
out that line here)

Before this change can be submitted, two things must be done:
1) the preferred pattern to designate integration tests needs to be chosen ("**/integration/**",
or "**/*IntegTest.java", etc)
2) tests need to be marked according to the pattern above (that normally implies moves or
renames).

If all or almost all tests now in Helix are slow integration tests, then maybe the fastest
thing to do is reverse the logic i did in the main pom and designate "unit" tests instead,
with a pattern like ("**/*UnitTest.java"). Maybe the renames that way will be less.

                
> Skip tests in default build or separate unit/integration tests
> --------------------------------------------------------------
>
>                 Key: HELIX-77
>                 URL: https://issues.apache.org/jira/browse/HELIX-77
>             Project: Apache Helix
>          Issue Type: Improvement
>            Reporter: Max Calderoni
>            Priority: Minor
>         Attachments: cleanups.patch, helix-77.patch
>
>
> A couple of miscellaneous questions about how you require building helix.
> Would it be possible to skip tests by default in your pom?
> Normally, after cloning sources (for experimenting/browsing), you would do:
> mvn clean install
> which for helix should take maybe 10-30 seconds.
> Because you have tests turned on by default the build takes much much longer (it looks
like there are integration tests in the mix, not only fast unit tests).
> I think it would be more usable for people doing 'mvn clean install' rather than the
more verbose:
> mvn clean install -Dmaven.test.skip.exec=true
> Attaching a patch that shows what i mean in the pom.
> The other related question is about integration tests. The reason why takes so long to
build is maybe because not all tests being run are unit tests.
> Sometimes there is no clear distinction between integration and unit tests, but the point
is that the build should be fast, so one way to distinguish, arguably, is that if a test is
slow is not a unit test.
> I can show one way of separating unit and integration tests in Maven (Maven does not
have very good support for this, there are different ways to work around it) in a later post
to this. Please let me know if there is any interest in correcting this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message