We are also running unit tests using SqlLite in memory. We create the
database before every test (just open the connection and use Schema
Export) and it is very fast.

We can switch to sql server by changing the build configuration. Then
it has a database for each test assembly, which is created once, but
tables are dropped and created before each test. This is quite slow,
but we rarely run tests on sql server.

On 7 Sep., 16:50, Jason Dentler <[email protected]> wrote:
> 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