batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <>
Subject how to best test tx integration problems?
Date Sun, 17 Jan 2016 17:00:05 GMT

referring to BATCHEE-88. 
What I like to do is to create a chunk with a Reader returning Integer 1..3 and a Writer which
stores it.
But all that with a TransactionManagerAdapter which I can control to blow up with various
exceptions ;)
E.g. simulating what happens if the commit goes boom with a javax.transaction.TransactionRolledbackException
or javax.transaction.TransactionRequiredException.
Or the same with rollback. 

We need to make sure retryable-exception-classes and skippable-exception-classes work fine
if the Tx blow up. 
I fear this is not the case right now.

So how to accomplish this the best way?
Introduce a new module ‚integration-tests’ with n sub-modules for each use case?
Or rather use the maven-invoker-plugin?

Or is it easily possible to tweak the ServicesManager and swap out a single Service? Don’t
think this will work easily when the JBatch runtime is alredy loaded…

Any thoughts?

View raw message