Skip to content

Commit

Permalink
Update TransientEventAwareEventRepositoryTest.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Enterprize1 authored Oct 9, 2023
1 parent c229495 commit abcb1e2
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,6 @@ public async Task HidesTransientEventsFromRemainingPipeline() {
_baseRepository.Verify(repository => repository.Publish(new[] { expectedBasePublish }), Times.Once);
}

[Fact]
public async Task CleansTransientEventsAfterDebounce() {
var envelopes = Wrap(new TransientMockEvent());
await _transientRepository.Publish(envelopes);

var firstResult = _transientRepository.GetCurrentTransientEvents().ToFlatEventList();
Assert.Single(firstResult);

for (var i = 0; i < 10; i++) {
await Task.Delay(20);

var delayedResult = _transientRepository.GetCurrentTransientEvents().ToFlatEventList();
Assert.Single(delayedResult);
}

Thread.Sleep(200);

var thirdResult = _transientRepository.GetCurrentTransientEvents().ToFlatEventList();
Assert.Empty(thirdResult);
}

[Fact]
public async Task DoesntCleanEventsBeforeExpiry() {
var envelopes = Wrap(new TransientMockEvent(), new ExpiringTransientMockEvent());
Expand Down

0 comments on commit abcb1e2

Please sign in to comment.