cloud-fan commented on a change in pull request #28250: URL: https://github.com/apache/spark/pull/28250#discussion_r411089336
########## File path: sql/core/src/test/scala/org/apache/spark/sql/execution/joins/BroadcastJoinSuite.scala ########## @@ -398,4 +399,22 @@ class BroadcastJoinSuite extends QueryTest with SQLTestUtils with AdaptiveSparkP } } } + + test("Broadcast timeout") { + val timeout = 30 + val slowUDF = udf({ x: Int => Thread.sleep(timeout * 10 * 1000); x }) + val df1 = spark.range(10).select($"id" as 'a) + val df2 = spark.range(5).select(slowUDF($"id") as 'a) + val testDf = df1.join(broadcast(df2), "a") + withSQLConf(SQLConf.BROADCAST_TIMEOUT.key -> timeout.toString) { + val e = intercept[Exception] { + testDf.collect() + } + AdaptiveTestUtils.assertExceptionMessage(e, s"Could not execute broadcast in $timeout secs.") Review comment: so this test runs 30 seconds? Can we make it a bit shorter? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org