On 28 Feb 2011, at 17:28, Sanne Grinovero wrote:
2011/2/28 Manik Surtani <manik(a)jboss.org>:
>
> On 22 Feb 2011, at 16:37, Jonathan Halliday wrote:
>
>>
>> That's actually going to change your test semantics slightly. You may
>> want to run in both optimized and non-optimized modes to ensure full
>> coverage - some code paths may not get exercised in one or the other case.
>
> Right; we actually DO want to test a full 2PC cycle. So we should disable any such
optimisations.
why should we disable any TM optimization, assuming we're not testing
the TM and it's able to figure out if going into "commitOnePhase" mode
is a possible option?
We could of course run in both modes to make sure, but I dind't
understand why you want to disable it; especially as I'd expect end
users to want to use it enabled.
Because we don't have multiple resources in some of the unit tests, but still expect
2PC behaviour (as this is what we are testing). Such a 2PC test becomes invalid if the TM
optimises to run the tx in a single phase because it doesn't find more than one
resource. :-)
HTH
Manik
--
Manik Surtani
manik(a)jboss.org
twitter.com/maniksurtani
Lead, Infinispan
http://www.infinispan.org