Commit f916a5bd authored by Nick Craver's avatar Nick Craver

Add test for #823

This is working as-design as ITransaction : IBatch and it's not safe in either, but adding a test to ensure it's performing correctly.
parent 0136dfd5
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
......@@ -25,6 +26,19 @@ public void BasicEmptyTran()
}
}
[Fact]
public void NestedTransactionThrows()
{
using (var muxer = Create())
{
var db = muxer.GetDatabase();
object asyncState = new object();
var tran = db.CreateTransaction();
var redisTransaction = Assert.IsType<RedisTransaction>(tran);
Assert.Throws<NotSupportedException>(() => redisTransaction.CreateTransaction(null));
}
}
[Theory]
[InlineData(false, false, true)]
[InlineData(false, true, false)]
......@@ -856,4 +870,4 @@ public void CombineFireAndForgetAndRegularAsyncInTransaction()
}
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment