public void OnlyOneWrittingTransactionPossible()
{
using (IKeyValueDB db = new InMemoryKeyValueDB())
{
using (var tr1 = db.StartTransaction())
{
tr1.CreateKey(_key1);
using (var tr2 = db.StartTransaction())
{
Assert.False(tr2.FindExactKey(_key1));
Assert.Throws<BTDBTransactionRetryException>(() => tr2.CreateKey(_key2));
}
}
}
}