public void OnlyOneWrittingTransactionPossible2()
{
using (var fileCollection = new InMemoryFileCollection())
using (IKeyValueDB db = new KeyValueDB(fileCollection))
{
var tr1 = db.StartTransaction();
tr1.CreateKey(_key1);
using (var tr2 = db.StartTransaction())
{
tr1.Commit();
tr1.Dispose();
Assert.False(tr2.FindExactKey(_key1));
Assert.Throws<BTDBTransactionRetryException>(() => tr2.CreateKey(Key2));
}
}
}