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

Add optional timeout to tests? #64

Closed
smassung opened this issue Dec 4, 2015 · 2 comments
Closed

Add optional timeout to tests? #64

smassung opened this issue Dec 4, 2015 · 2 comments

Comments

@smassung
Copy link

smassung commented Dec 4, 2015

Does it seem useful to have a timeout option on tests? For example, a third parameter to it:

it("should do something", [&](){
      AssertThat(something, IsTrue());
}, 10);

where this indicates a timeout of 10 seconds (or whatever). By default, there could be no timeout, or a user can set a default timeout via a command line parameter.

I'm imagining a use case where bandit is part of CI tests, and we don't want infinite looping tests.

@smassung
Copy link
Author

smassung commented Dec 4, 2015

(or should this be something that's handled at a higher level, such as in the CI tool, or in the command running the tests?)

@joakimkarlsson
Copy link
Collaborator

I think this would add complexity to bandit without enough gain to be warranted. My suggestion is to either handle this in your build system or in your tests.

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

No branches or pull requests

2 participants