Uros Stankovic created SPARK-52790:
--------------------------------------

             Summary: Introduce new grid testing method which provides better 
naming
                 Key: SPARK-52790
                 URL: https://issues.apache.org/jira/browse/SPARK-52790
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 4.0.0
            Reporter: Uros Stankovic


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.

 
{code:java}
gridTest("Select with limit")(Seq(true, false)) { pushdownEnabled =>
 ...
} {code}
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:
{code:java}
gridTest("Select with limit")(Seq(
  GridTestCase(params = true, suffix = "pushdown enabled"),
  GridTestCase(params = false, suffix = "pushdown disabled"),
)) { pushdownEnabled =>  ... }  {code}


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).

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to