Skip to content
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

Allow configuration of receive timeout for assert_*, and refute_* functions #506

Closed
validere-ben opened this issue Dec 17, 2019 · 1 comment · Fixed by #605
Closed

Allow configuration of receive timeout for assert_*, and refute_* functions #506

validere-ben opened this issue Dec 17, 2019 · 1 comment · Fixed by #605

Comments

@validere-ben
Copy link

validere-ben commented Dec 17, 2019

Context

We're currently running into issues with intermittent test failures in certain environments due to the hardcoded 100ms receive timeout on these test assertions.

Judging from #228 100ms being hardcoded seems quite arbitrary?

Suggestions

Having a :timeout opt be added to these functions or adding /2 variants allowing a timeout specification would be a welcome extension.

There is also the existing refute_timeout configuration option which seems to only be used with assert_no_emails_delivered/0 currently (should refute_email_delivered_with/1 be using this as well?). Following this existing convention, an assert_timeout 'global' configuration option might be more suitable?

I'd be happy to cut a PR with the changes depending on the approach/solution preferred for this.

@validere-ben validere-ben changed the title Allow configuration of receive timeout for assert_delivered_email/1, assert_email_delivered_with/1, refute_email_delivered_with/1 Allow configuration of receive timeout for assert_delivered_email/1, assert_email_delivered_with/1, and refute_email_delivered_with/1 Dec 17, 2019
@validere-ben validere-ben changed the title Allow configuration of receive timeout for assert_delivered_email/1, assert_email_delivered_with/1, and refute_email_delivered_with/1 Allow configuration of receive timeout for assert_*, and refute_* functions Feb 3, 2020
@germsvel
Copy link
Collaborator

Hi @validere-ben. Thank you for opening up this issue, and thanks for the patience! I think it'd be a great idea to make that timeout configurable by passing a timeout option. We can just keep 100ms as the default. I know it's been a while since you opened this issue, but if you're interested, I'd review a PR for this. Otherwise, thanks for the idea. Maybe someone else will come along and be interested in taking this.

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

Successfully merging a pull request may close this issue.

2 participants