public void ExecutionExceptionsAreRethrown() { using (GetNewServer(port, path)) using (var shard1 = new DocumentStore { Url = "http://localhost:8079" }.Initialize()) using (var session = shard1.OpenAsyncSession()) { var parallelShardAccessStrategy = new ParallelShardAccessStrategy(); Assert.Throws<ApplicationException>(() => parallelShardAccessStrategy.ApplyAsync<object>(new[] { shard1.AsyncDatabaseCommands }, new ShardRequestData(), (x, i) => { throw new ApplicationException(); }).Wait()); } }
public void ExecutionExceptionsAreRethrown() { using (GetNewServer()) using (var shard1 = new DocumentStore { Url = "http://localhost:8079" }.Initialize()) using (var session = shard1.OpenAsyncSession()) { var parallelShardAccessStrategy = new ParallelShardAccessStrategy(); Assert.Throws <ApplicationException>(() => parallelShardAccessStrategy.ApplyAsync <object>(new[] { shard1.AsyncDatabaseCommands }, new ShardRequestData(), (x, i) => { throw new ApplicationException(); }).Wait()); } }