-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37727][SQL][TESTS][FOLLOW-UP] Add test cases for logs in SparkSession.builder.getOrCreate #35048
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
Conversation
|
cc @cloud-fan, @AngersZhuuuu @yaooqinn FYI |
AngersZhuuuu
left a comment
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.
LGTM.
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Outdated
Show resolved
Hide resolved
|
+1,LGTM |
|
Wait .. the tests pass in IDE but fails in SBT shall command. Let me investigate this a bit more. |
| if (level.isDefined) { | ||
| logger.setLevel(level.get) | ||
| logger.get().setLevel(level.get) | ||
| LogManager.getContext(false).asInstanceOf[LoggerContext].updateLoggers() |
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.
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.
I think the issue is the same. Once the log level is set, it doesn't get changed. That's why it passed in IDE when I run it individually, and it fails when I run them in batch via SBT.
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.
I don't mind making this in a separate PR if you guys feel that's better.
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.
lgtm. I thought we should update the loggers here too. I actually was wondering if this should be do the same, but as no test failure happens I thought it maybe fine. :)
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.
Thanks!
|
Merged to master! |
…Session.builder.getOrCreate ### What changes were proposed in this pull request? This PR adds some test cases for apache#35001. Test cases were not added because there are related bugs but they are fixed now. ### Why are the changes needed? To avoid regressions. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? This PR adds test cases that were manually tested in apache#35001. Closes apache#35048 from HyukjinKwon/SPARK-37727-followup. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
This PR adds some test cases for #35001. Test cases were not added because there are related bugs but they are fixed now.
Why are the changes needed?
To avoid regressions.
Does this PR introduce any user-facing change?
No, dev-only.
How was this patch tested?
This PR adds test cases that were manually tested in #35001.