Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23962

Flaky tests from SQLMetricsTestUtils.currentExecutionIds

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.0
    • 2.3.1, 2.4.0
    • SQL, Tests
    • None

    Description

      I've seen org.apache.spark.sql.execution.metric.SQLMetricsSuite.SortMergeJoin metrics fail https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/4150/testReport/org.apache.spark.sql.execution.metric/SQLMetricsSuite/SortMergeJoin_metrics/
      with

      Error Message
      org.scalatest.exceptions.TestFailedException: 2 did not equal 1
      
      Stacktrace
      sbt.ForkMain$ForkError: org.scalatest.exceptions.TestFailedException: 2 did not equal 1
      	at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:528)
      	at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1560)
      	at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:501)
      	at org.apache.spark.sql.execution.metric.SQLMetricsTestUtils$class.getSparkPlanMetrics(SQLMetricsTestUtils.scala:146)
      	at org.apache.spark.sql.execution.metric.SQLMetricsSuite.getSparkPlanMetrics(SQLMetricsSuite.scala:33)
      	at org.apache.spark.sql.execution.metric.SQLMetricsTestUtils$class.testSparkPlanMetrics(SQLMetricsTestUtils.scala:187)
      	at org.apache.spark.sql.execution.metric.SQLMetricsSuite.testSparkPlanMetrics(SQLMetricsSuite.scala:33)
      	at org.apache.spark.sql.execution.metric.SQLMetricsSuite$$anonfun$7$$anonfun$apply$mcV$sp$1.apply$mcV$sp(SQLMetricsSuite.scala:188)
      	at org.apache.spark.sql.test.SQLTestUtilsBase$class.withTempView(SQLTestUtils.scala:260)
      ...
      

      I believe this is because SQLMetricsTestUtils.currentExecutionId() is racing with the listener bus.
      I'll attach trimmed logs as well

      Attachments

        1. unit-tests.log
          623 kB
          Imran Rashid

        Activity

          People

            irashid Imran Rashid
            irashid Imran Rashid
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: