Skip to content

Added epsilon value to the Within assertion. #2177

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

Merged
merged 1 commit into from
Jul 13, 2016

Conversation

marcpiechura
Copy link
Contributor

closes #2130

@@ -93,7 +93,8 @@ public T Within<T>(TimeSpan min, TimeSpan max, Func<T> function, string hint = n
}
if (!_testState.LastWasNoMsg)
{
var tookTooLong = elapsed > maxDiff;
epsilonValue = epsilonValue ?? TimeSpan.Zero;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the current behavior intact

[Fact]
public void Within_should_increase_max_timeout_by_the_provided_epsilon_value()
{
Within(TimeSpan.FromSeconds(1), () => ExpectNoMsg(), TimeSpan.FromMilliseconds(50));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Akka.TestKit Within and ExpectNoMsg can't be used together
2 participants