diff --git a/src/Fluss.UnitTest/Core/UnitOfWork/UnitOfWorkTest.cs b/src/Fluss.UnitTest/Core/UnitOfWork/UnitOfWorkTest.cs index d186c5e..64c050b 100644 --- a/src/Fluss.UnitTest/Core/UnitOfWork/UnitOfWorkTest.cs +++ b/src/Fluss.UnitTest/Core/UnitOfWork/UnitOfWorkTest.cs @@ -336,7 +336,7 @@ await Assert.ThrowsAsync(async () => public async Task FailingCommitDoesNotCacheEventsToWrite() { _policies.Add(new AllowAllPolicy()); - + try { await _unitOfWorkFactory.Commit(async unitOfWork => @@ -352,10 +352,10 @@ await _unitOfWorkFactory.Commit(async unitOfWork => } await _unitOfWorkFactory.Commit(_ => ValueTask.CompletedTask); - + var unitOfWork = GetUnitOfWork(); var aggregate = await unitOfWork.GetAggregate(100); - + Assert.False(aggregate.Exists); } diff --git a/src/Fluss/UnitOfWork/UnitOfWork.cs b/src/Fluss/UnitOfWork/UnitOfWork.cs index 7c49bb5..677b18d 100644 --- a/src/Fluss/UnitOfWork/UnitOfWork.cs +++ b/src/Fluss/UnitOfWork/UnitOfWork.cs @@ -105,7 +105,6 @@ public ValueTask Return() _validator = null; _userIdProvider = null; _consistentVersion = null; - PublishedEventEnvelopes.Clear(); _readModels.Clear(); _isInstantiated = false;