Peter Bengtsson wrote at 2008-11-5 15:14 +0000:
> ...
>> When I wrote a functional test browser (years before "zope3"),
>> I emulated the Zope publisher rather than calling it directly
>> in order to have control how transactions are handled.
>>
>> Especially, I used subtransactions instead of top level transactions
>> to avoid the bug reported by Peter.
>>
>
>Uh? "subtransactions"?
>So how would you recommend that I go abouts doing this?

"savepoint"s have replaced subtransactions.

This means:

  When a request starts, a new savepoint is created.
  When the request would cause a transaction abort (in normal operation),
  the test request will roll back to the saved savepoint. Otherwise,
  the modifications are kept.

  When the complete test ends, the transaction is aborted, wiping out
  all modifications done be the test. Of course, this works only when
  all resouce managers in the transaction support savepoints (which
  probably means that all resource managers need to be ZODB connections).



-- 
Dieter
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to