Closed EtherZa closed 2 months ago
There is something funky going on with the Kafka topics around outbox integration tests. These tests still run against cloudkarafka. Started to look into this, unfortunately the free tier gives little management options.
There is something funky going on with the Kafka topics around outbox integration tests.
The Kafka tests in general seem to be a little flaky, but that doesn't appear to be the issue here.
SlimMessageBus.Host.Outbox.DbContext.Test.OutboxTests.Given_CommandHandlerInTransaction_When_ExceptionThrownDuringHandlingRaisedAtTheEnd_Then_TransactionIsRolledBack_And_NoDataSaved_And_NoEventRaised(transactionType: TransactionScope, busType: AzureSB, messageCount: 100)
39s 636ms
Error:
Expected store.Count to be 67, but found 66 (difference of -1).
Stack trace:
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
at FluentAssertions.Numeric.NumericAssertions`2.Be(T expected, String because, Object[] becauseArgs)
at SlimMessageBus.Host.Outbox.DbContext.Test.OutboxTests.Given_CommandHandlerInTransaction_When_ExceptionThrownDuringHandlingRaisedAtTheEnd_Then_TransactionIsRolledBack_And_NoDataSaved_And_NoEventRaised(TransactionType transactionType, BusType busType, Int32 messageCount) in /home/runner/work/SlimMessageBus/SlimMessageBus/src/Tests/SlimMessageBus.Host.Outbox.DbContext.Test/OutboxTests.cs:line 188
--- End of stack trace from previous location ---
The logs are showing that only 66 messages are actually being published in the CI run (both by OutboxForwardingPublishInterceptor
and OutboxSendingTask
). The full set goes through on a local run though.
@EtherZa once #281 is merged, please rebase. It should solve the issue.
Failed conditions
20.8% Coverage on New Code (required ≥ 75%)
@zarusz I've rebased. I don't quite know how you came to the conclusion that Kafka was to blame with the ASB test failing, but that does seem to have fixed it! :)
@EtherZa when I run locally against CloudKarafka (as the GItHub Runners do) then the issue was with the Kafka variant of the Outbox tests. I think the way how Failed tests appear in the console is misleading.
Let me know if you're ready then and I good to merge.
@zarusz I don't have anything more to add to this one :)
I hope this one does not peeve you. I know that this sort of submission can make some irate, but I promise it is not my intention :)
I tend to correct any typos as I come across them, but it bloats the change and becomes a PITA when I back out of a path. So instead, I put forward a PR that doesn't provide any functionality but avoids future bloat (form me) while hopefully improving documentation, etc.