Bruno,
Run each test against its own copy of the DB. You don't even need to
rollback the transaction - just delete the copy.

This works great if you can test with a lightweight RDBMS like SQLite. If
you absolutely must test against something "heavy" like SQL Server or
Oracle, this probably isn't a reasonable solution.

Jason

On Mon, Sep 7, 2009 at 7:13 AM, Bruno Wouters <[email protected]>wrote:

>
> Hi all,
>
> I would like to speed up our unit test run by letting two tests run a
> the same time. But running two test threads at the same time causes
> deadlocks on the database. Every test is contained in a transaction
> and is rolled back at the end of the test(using
> ISession.BeginTransaction & ISession.Transaction.Rollback). The
> isolation level is readcommitted.
>
> I was wondering if it is possible to prevent any locks on the
> database. No test should/will never see data of another test because
> it is always rolled back and never committed.
>
> Is something like this possible?
>
> Thanks!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to