public virtual bool CheckConsumerSuccessfullyConsumed() { _scenarioDbContext.WaitForIndexesAfterSaveChanges(); var result = _inMemoryTestHarness.Consumed.Select <TEvent>(s => s.Exception == null).Any(); _groupTransactionExecutionService.OnError = null; _groupTransactionExecutionService.OnError += (object sender, Exception exception) => { result = false; }; bool executed = false; while (!executed) { executed = _groupTransactionExecutionService.Execute(); } _scenarioDbContext.SaveChanges(); _scenarioDbContext.WaitForIndexesToBeFresh(); return(result); }
public void ThenStartProcessingTheMessages() { var handlerSuccessfullyExecuted = true; Exception exception = null; _groupTransactionExecutionService.OnError = null; _groupTransactionExecutionService.OnError += (object sender, Exception ex) => { handlerSuccessfullyExecuted = false; exception = ex; }; bool executed = false; while (!executed) { executed = _groupTransactionExecutionService.Execute(); } }
public Task Execute(IJobExecutionContext context) { _transactionExecutionService.Execute(); return(Task.CompletedTask); }