-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added InverseFishForMessage and nuget package fluent-assertions #5430
Added InverseFishForMessage and nuget package fluent-assertions #5430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - left behind some nitpicks but we can deal with those in separate PRs
@@ -11,6 +11,7 @@ | |||
|
|||
<ItemGroup> | |||
<EmbeddedResource Include="Configs\TestScheduler.conf;Internal\Reference.conf" /> | |||
<PackageReference Include="FluentAssertions" Version="5.10.3" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably just take a dependency on FluentAssertions in the TestKit. I don't know why we haven't yet.
I'll make a bigger issue for this and we'll revisit that prior to releasing v1.4.30.
@@ -56,6 +58,23 @@ public T FishForMessage<T>(Predicate<T> isMessage, TimeSpan? max = null, string | |||
} | |||
} | |||
|
|||
/// <summary> | |||
/// Receives messages until <paramref name="max"/>. Ignores all messages except for a message of type <typeparamref name="T"/>. Asserts that all messages are not of the of type <typeparamref name="T"/>. Note that when comparing types, inheritance is ignored, in other words, only perfectly matching types are asserted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to format this into a few separate lines.
/// <typeparam name="T">The type that the message is not supposed to be.</typeparam> | ||
/// <param name="probe"></param> | ||
/// <param name="max"></param> | ||
public async static Task InverseFishForMessage<T>(TestProbe probe, TimeSpan? max = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably name this ReceiveUntil
, FishUntil
or something like that.
Implement nitpicks from akkadotnet#5430
* Make updates to `FishUntil` Implement nitpicks from akkadotnet#5430 * Nitpick * cleaned up `FishUntilMessage` * removed `FluentAssertions` reference * fixed bad `TestKit.ReceiveTests`
) * remove the forced waiting on the underlying transport to start up * racy spec fix: `BackoffOnRestartSupervisor_must_respect_maxNrOfRetries_property_of_OneForOneStrategy` (#5442) issue was that using `AutoReset` could cause a race where if the scheduler could reset the count in-flight and throw off the estimates used by the tests. Using a `ManualReset` avoids this issue. * deleted commented out code * Make updates to `FishUntil` (#5433) * Make updates to `FishUntil` Implement nitpicks from #5430 * Nitpick * cleaned up `FishUntilMessage` * removed `FluentAssertions` reference * fixed bad `TestKit.ReceiveTests` * Custom frame size computation support in Framing (#5444) * Custom frame size computation support in Framing * Speed up of framing spec * optimize `Props` `NewExpression` allocations (#5428) per #5416 (comment) Co-authored-by: Ismael Hamed <[email protected]>
This pull request is based on a thread I had with @Aaronontheweb on Gitter: https://gitter.im/akkadotnet/akka.net?at=61ae5b0acd3f06175df32eda.