Skip to content

Commit

Permalink
Fix test fail reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorstenThiel committed Oct 4, 2024
1 parent 0997c13 commit a881a76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ jobs:
dotnet-version: |
8.x
9.x
- name: Restore
run: dotnet restore
working-directory: ./src
- name: Build
run: dotnet build --no-restore
working-directory: ./src
- name: Test
run: dotnet test --verbosity normal --collect:"XPlat Code Coverage"
run: dotnet test --collect:"XPlat Code Coverage" --no-restore --no-build
working-directory: ./src/Fluss.UnitTest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,6 @@ public async Task HidesTransientEventsFromRemainingPipeline()
_baseRepository.Verify(repository => repository.Publish(new[] { expectedBasePublish }), Times.Once);
}

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

var firstResult = _transientRepository.GetCurrentTransientEvents().ToFlatEventList();
Assert.Equal(2, firstResult.Count);

Thread.Sleep(300);

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

Thread.Sleep(150);

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

private static List<EventEnvelope> Wrap(params Event[] events)
{
return events.Select((e, i) =>
Expand Down

0 comments on commit a881a76

Please sign in to comment.