You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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
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.
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 withassert_no_emails_delivered/0
currently (shouldrefute_email_delivered_with/1
be using this as well?). Following this existing convention, anassert_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.
The text was updated successfully, but these errors were encountered: