I'm writing some Unit tests against a database, and we're using transactions to make sure that our test data gets removed at the end.
I'm running into a problem where methods that I'm testing are using their own TransactionScope objects, and it seems to be blocking when hitting the database.
This is inside my test's base class:
BaseScope = new CommittableTransaction(new TransactionOptions() { IsolationLevel = IsolationLevel.ReadUnCommitted, Timeout = new System.TimeSpan(0, 5, 0) });
and then inside the method I'm testing, it does:
using (TransactionScope scope = new TransactionScope())
The first time that the code inside the 2nd scope their touches the database, it hangs. Do I have any way around this problem?