Akka.TestKit: ensure that EventFilter respects WithinAsync timeout blocks#7541
Merged
Arkatufus merged 20 commits intoakkadotnet:devfrom Apr 18, 2025
Merged
Conversation
Aaronontheweb
commented
Mar 20, 2025
Member
Author
Aaronontheweb
left a comment
There was a problem hiding this comment.
Detailed my changes
| */ | ||
| const double epsilonPercentage = 0.15; // 15% fudge factor | ||
| const double minimumEpsilonValueMs = 50.0d; // 50ms minimum epsilon value | ||
| epsilonValue ??= TimeSpan.FromMilliseconds(Math.Max(max.TotalMilliseconds * epsilonPercentage, minimumEpsilonValueMs)); |
Member
Author
There was a problem hiding this comment.
Calculate a default epsilon value
| } | ||
| else | ||
| { | ||
| timeoutValue = _testkit.RemainingOrDefault; |
Member
Author
There was a problem hiding this comment.
Make sure we use any time values set by Within / WithinAsync
Member
Author
|
I threw some TBD removals in here while I was poking around, since the test suite that was failing as a result of my first set of changes (have |
Arkatufus
requested changes
Mar 20, 2025
src/core/Akka.TestKit/EventFilter/Internal/EventFilterApplier.cs
Outdated
Show resolved
Hide resolved
Member
Author
Akka.TestKit.Tests.TestKitBaseTests.WithinTests.Within_should_increase_max_timeout_by_the_provided_epsilon_valueGuess I'm going to need to look at that test too - first time I've seen it fail in 30-something attempts |
This was referenced Oct 7, 2025
This was referenced Oct 20, 2025
This was referenced Nov 6, 2025
This was referenced Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Discovered while debugging one of the
MergeHubspecs that a 10s timeout from aWithinAsyncblock was not being passed to theEventFilter.ExpectOneAsyncmethod, which instead timed out to 3s.Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):