Add runAndValidate() to wrap scheduleAndRun() and testValidate() pattern #5113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements recommendation from #3020. Adds
runAndValidate()to wrap thescheduleAndRun()andtestValidate()pattern that is common in many tests.IMO I'm not a huge fan of this change. There is a lot of variety in the way
scheduleAndRun()andtestValidate()are called.scheduleAndRun()has a default argument, andtestValidate()has 3 overloads, some of which also have default arguments. I opted not to add any overloads forrunAndValidate(), which means that there's plenty of cases where it can't be used. I think it was a little confusing the number of patterns we had before, and this PR makes it worse by adding another one.And due to 80col limit, this PR is more verbose in some cases.