Skip to content

Disabling Tests #84

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

Merged
merged 1 commit into from
Apr 30, 2021
Merged

Disabling Tests #84

merged 1 commit into from
Apr 30, 2021

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.

Verified

This commit was signed with the committer’s verified signature.
MGatner MGatner
@@ -129,7 +129,7 @@ public function endTestSuite(TestSuite $suite): void
*/
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.

None yet

2 participants