hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From N Keywal <nkey...@gmail.com>
Subject unit test split progress - classes are now tagged - script available -surefire coming
Date Wed, 09 Nov 2011 20:59:03 GMT
Hello,

The large and medium tests class are now tagged with JUnit categories. I
proposed to have "small" as default, but it's actually annoying with JUnit,
because when you use "excludedGroups" JUnit will retain only the tests
without any category at all. I also fear some unclear surefire behavior. So
it's better to be explicit I think. So I added a part2 in the patch 4737 (a
few minutes ago => not made it to the trunk yet). I will update the doc as
well. Of course, there will be move and split between categories :-).


*Now, when you add new test class, please put the right category for this
class.*


There is already a script in 4737 to run the tests with one maven instance
for small tests and two maven instances for medium (and large if selected).
You can give it a try already. The only issues will be with new tests
classes not tagged as medium or large, but there is a warning when the test
is suspicious. You should be able to run all the tests in less than one
hour with it.  Medium should be before 30 minutes.


On the short & medium term, this script makes sense at it allows to
parallelise with multiple process while surefire today allows only
intra-process parallelization.


Surefire is useful as it's standard. We need a version of surefire that
support Junit Categories as well. Good news, they committed this a few
hours ago (https://jira.codehaus.org/browse/SUREFIRE-329), but I still need
to double check it. We will also need a patched version of JUnit (see
https://github.com/KentBeck/junit/issues/359). They put it as a bug, so
it's likely to be in a later version, but short term, we will need a
patched version. Unfortunately, and I spent my whole day on this, there is
a conflict between the junit patch and surefire junit provider 47/8 with
parameterized classes. It's strange because surefire junit47/8 works, non
parameterized tests works, non patched junit works, but put them altogether
and they don't work. I am working on fixing this, it's quite messy.

The target for surefire would be:
- default launch small tests in parallel in a single jvm, then medium tests
with a different jvm per tests, as today - I think it's possible, but I
have not tried yet.
- option (profile? failsafe? other? don't know yet) to launch the large
tests as well
- jenkins would run the small tests in parallel in a single jvm, then all
tests with a different jvm per test.


That's it! Thanks for reading,


N.

PS: Note that there is a typo in the .pom, and the small tests are executed
in a single instance but not in parallel yet. This will come soon with the
surefire patch.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message