> Am 14.09.2025 um 18:11 schrieb Elliotte Rusty Harold <[email protected]>:
> 
> On Sun, Sep 14, 2025 at 1:10 PM Rüdiger <[email protected]> wrote:
>> 
>> On 14. Sep 2025, at 12:32, Elliotte Rusty Harold <[email protected]> wrote:
>>> In general ITs, including our own, are too flaky, too heavyweight, and
>>> too configuration dependent to execute them by default when the user
>>> is trying to do something else like package or install.
>> 
>> `verify` is _after_ the `package` phase, so that is not an issue.
>> 
>> And most often, `install` is not what you want anyway. Prefer `package` then.
>> 
>> If your ITs are flaky, heavy, etc., maybe you should fix them?
>> But if that is a deliberate choice, just set `-DskipITs`.
> 
> That's essentially proposing to convert all ITs to unit tests, in
> which case we don't need failsafe at all. The reason we separate ITs
> from unit tests is that some operations like bringing up and
> communicating with an actual database are fundamentally stochastic,
> unreliable, and slow.

I can not second this. We use test-containers a lot and using flyweight prepare 
the DB for integration tests so they succeed very reliably. 
Concerning the speed: it takes about 40 seconds minute on an ARM M3 MacBook Pro 
to run 206 integration tests using 'mvn —threads=3 verify' against postgres 
container and this does include spinning up spring-boot configuration for the 
test code divided in 11 test classes where we spawn 26 DB instances in total.

What you describe might be system or acceptance tests which run against 
existing databases in a QA or Prod system.

Mit freundlichen Grüßen
Mirko



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to