Skip to content

Conversation

@MGatner
Copy link
Contributor

@MGatner MGatner commented Mar 18, 2021

This PR adds the option to disable individual tests by setting the @slowThreshold annotation to 0.

This was referenced in a few other issues and something I would use a lot. I think this is the cleanest approach but let me know if you would prefer an alternate annotation, like @disableThreshold.

protected function isSlow(int $time, int $slowThreshold): bool
{
return $time >= $slowThreshold;
return $time && $time >= $slowThreshold;
Copy link
Owner

Choose a reason for hiding this comment

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

This line should first check $slowThreshold instead of $time. I'll fix this in master after merging the PR.

return $slowThreshold && $time >= $slowThreshold;

@johnkary
Copy link
Owner

@MGatner Thanks for this PR!

The PR as proposed doesn't quite work as intended, but it's an easy fix after I merge this. See inline comment above.

This feature will be included in the next major release v4.0. It's very close to being tagged.

@johnkary johnkary merged commit eff89f6 into johnkary:master Apr 30, 2021
@MGatner MGatner deleted the disable branch April 30, 2021 20:27
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.

2 participants