public void OnlyOneWrittingTransactionPossible2()
{
using (IKeyValueDB db = new InMemoryKeyValueDB())
{
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));
}
}
}