Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Timeout Rule replacement #1246

Closed
littleclay opened this issue Jan 17, 2018 · 1 comment
Closed

Timeout Rule replacement #1246

littleclay opened this issue Jan 17, 2018 · 1 comment

Comments

@littleclay
Copy link

Feature request
We have a large number of end-to-end automation tests that have a dependency on an external resource (e.g. network calls, actual db, etc). There have been times that a test run will get caught up waiting for db locks, etc. In JUnit 4 we solve these problems by using the Timeout rule on a base class that our automation test classes extends. I don't see any way to replicate that behavior in JUnit 5, though.

According to the following comment it sounds like the only current solution is to use the assertions that have a timeout, but this only works for a timeout of the assertion itself, not for other parts of the test method (e.g. during setup).

#343

Deliverable
Have a way of preemptively terminating an executing test at any point in it's lifecycle.

P.S.
I suppose if we had control of the thread executing the tests at an appropriate time (so that the time countdown doesn't include time waiting for the test to actually start executing) as per this issue we could solve this with an extension similarly to how the timeout rule works, but I'm unsure of how much control the actual implementation of this issue will give extension authors.

#20

@sbrannen
Copy link
Member

I'm closing this issue as a duplicate of #80.

Feel free to provide further input as a comment for that issue.

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

No branches or pull requests

2 participants