Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/22631#discussion_r223253381 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala --- @@ -110,7 +112,7 @@ class CastSuite extends SparkFunSuite with ExpressionEvalHelper { } test("cast string to timestamp") { - for (tz <- ALL_TIMEZONES) { + for (tz <- Random.shuffle(ALL_TIMEZONES).take(50)) { --- End diff -- > tests need to be deterministic, or else what's the value? failures can't be reproduced That's not true. AFAIK we have a lot of tests that generate data randomly, and if it fails, the test name will include the seed(or the generated data), so people can easily reproduce it. I think it's a good strategy to test a subset of possible cases, to make a tradeoff between how soon we can discover a bug, and how fast we can iterate.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org