diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 035cdc5..546b0e7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -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 diff --git a/src/Fluss.UnitTest/Core/TransientEvents/TransientEventAwareEventRepositoryTest.cs b/src/Fluss.UnitTest/Core/TransientEvents/TransientEventAwareEventRepositoryTest.cs index ec628c8..f3f1950 100644 --- a/src/Fluss.UnitTest/Core/TransientEvents/TransientEventAwareEventRepositoryTest.cs +++ b/src/Fluss.UnitTest/Core/TransientEvents/TransientEventAwareEventRepositoryTest.cs @@ -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 Wrap(params Event[] events) { return events.Select((e, i) =>