-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-28894][SQL][TESTS] Add a clue to make it easier to debug via Jenkins's test results #25630
Conversation
I am going to revert 28e7f2f after we see the test results. It's for testing if the failed tests really have the file name in its assert message. |
cc @dilipbiswal, @dongjoon-hyun, @maryannxue FYI |
// This is a temporary workaround for SPARK-28894. The test names are truncated after | ||
// the last dot due to a bug in SBT. This makes easier to debug via Jenkins test result | ||
// report. See SPARK-28894. | ||
withClue(s"${testCase.name}${System.lineSeparator()}") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual change is just:
withClue(s"${testCase.name}${System.lineSeparator()}") {
...
}
Test build #109942 has finished for PR 25630 at commit
|
This reverts commit 28e7f2f.
Test build #109951 has finished for PR 25630 at commit
|
It seems that it still has the same title |
@HyukjinKwon Its much better than what we had before. thanks !! Looks good to me. |
Got it. It's much better! So, in the successful run, there is no information in the last Jenkins. When we have a failure, |
I compared both results. +1, LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @HyukjinKwon and @dilipbiswal .
Merged to master!
Thanks! |
What changes were proposed in this pull request?
See https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/109834/testReport/junit/org.apache.spark.sql/SQLQueryTestSuite/
Root cause seems a bug in SBT - it truncates the test name based on the last dot.
sbt/sbt#2949
https://github.com/sbt/sbt/blob/v0.13.18/testing/src/main/scala/sbt/JUnitXmlTestsListener.scala#L71-L79
I tried to find a better way but couldn't find. Therefore, this PR proposes a workaround by appending the test file name into the assert log:
[info] - inner-join.sql *** FAILED *** (4 seconds, 306 milliseconds) + [info] inner-join.sql [info] Expected "1 a [info] 1 a [info] 1 b [info] 1[]", but got "1 a [info] 1 a [info] 1 b [info] 1[ b]" Result did not match for query #6 [info] SELECT tb.* FROM ta INNER JOIN tb ON ta.a = tb.a AND ta.tag = tb.tag (SQLQueryTestSuite.scala:377) [info] org.scalatest.exceptions.TestFailedException: [info] at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:528)
It will at least prevent us to search full logs to identify which test file is failed by clicking filed test.
Note that this PR does not fully fix the issue but only fix the logs on its failed tests.
Why are the changes needed?
To debug Jenkins logs easier. Otherwise, we should open full logs and search which test was failed.
Does this PR introduce any user-facing change?
It will print out the file name of failed tests in Jenkins' test reports.
How was this patch tested?
Manually tested but Jenkins tests are required in this PR.
Now it at least shows which file it is: