Get test naming practices straight


In the -elasticsearch plugin, we use this filter in the maven-failsafe-plugin configuration:

The filter <include>*/.java</include> means that we execute pretty much every test. Including unit tests, which are supposed to be suffixed with "Test" (as opposed to "IT" for integration tests).

From a test coverage point of view, there's no point in doing that, since those tests are supposedly unaffected by the change of indexing service. But we have to do that because many integration tests are actually using the *Test suffix, especially in the -orm and -engine modules, making unit tests indistinguishable from integration tests.

Thus a simple naming problem is currently slowing down our build. It may not have been a big deal until now, but with (add the -engine tests to the -elasticsearch module) it's getting worse, and it will also get worse each time we add another indexing service (Solr, ...).

We should probably consider renaming our integration tests in -engine and -orm to use the "IT" suffix, or move them to a separate folder (src/integration/main for instance), or both.




Sanne Grinovero
November 17, 2016, 2:58 PM

I'm aware that our naming conventions are not the canonical ones, yet remember that the "pure" unit tests will execute very quickly, so we're not really wasting much execution time.

We can talk about moving them, but if we get into that let's remember which integration combinations we want to support. We have both a front-end API axis ORM|Infinispan|Other? and a backend integration axis Lucene|ES|Other(serialization?), and that's on top of the additional axis: for each ORM test we have several databases, and for all of these we have a set of JVM versions, a set of JVM vendors and a set of supported OS es.

+1 to make a rationale plan, but let's not start moving stuff around without a good plan.

Yoann Rodière
November 17, 2016, 3:04 PM

+1 to make a rationale plan, but let's not start moving stuff around without a good plan.

Totally agree with that. That's the reason I created this ticket, actually: to make sure we take this issue into account when addressing HSEARCH-2385.

Yoann Rodière
May 20, 2019, 7:06 AM

Adding this to the backlog even though it’s fixed in Search 6: I’d like to add a jqassistant rule to make sure tests in -integrationtest- modules end with “IT” and other tests end with “Test”.


Yoann Rodière


Yoann Rodière



Suitable for new contributors


Feedback Requested



Fix versions