urosstan-db opened a new pull request, #51474:
URL: https://github.com/apache/spark/pull/51474
Currently, gridTest accepts test name prefix and sequence of parameters.
Final test name is made like this `testNamePrefix + s" ($param)"`. Which is
not good since developers often don't know how final test name would look like
and pass here sequence of map, or sequence of booleans, which results in
unintuitive test case names.
E.g.
```
gridTest("Select with limit")(Seq(true, false)) { pushdownEnabled =>
...
}
```
Will result in registering of next test cases:
* Select with limit (true)
* Select with limit (false)
Instead of that, developers should provide descriptive name suffix:
```
gridTest("Select with limit")(Seq(
GridTestCase(params = true, suffix = "pushdown enabled"),
GridTestCase(params = false, suffix = "pushdown disabled"),
)) { pushdownEnabled => ... }
```
Instead of relying on developers to look for base implementation and make
some case class for parameters with overriden `toString` implementation, we
should enforce engineers to provide suffix. (Even with proper `toString`
implementation, intent of test case may be unknown).
### What changes were proposed in this pull request?
- Add new grid test which accepts `GridTestCase` case class, so developers
need to provide test name suffix
- Deprecate old grid test (we can remove it as well, since it is not used in
many places)
- Make JDBCV2Test use newer grid test method to be sure there are no
conflicts in method invocation.
### Why are the changes needed?
Improving test naming and making `gridTests` more descriptive.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Build is enough
### Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]