-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-34590][TESTS] Allow JDWP debug for tests #31706
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
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #135638 has finished for PR 31706 at commit
|
dongjoon-hyun
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.
Thanks, @sarutak . Is there a reason not to do this in Maven?
|
@dongjoon-hyun It's just because I don't know how to do the same thing for Maven for now. I'll add the same feature after I find the way. |
|
It would just be a new profile that modifies some test runner settings or something |
|
@srowen @dongjoon-hyun |
|
I think it's OK to just add for SBT. |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #135683 has finished for PR 31706 at commit
|
I usually use SBT so it's OK for me but @dongjoon-hyun , do you think it's OK even if this change doesn't contain this feature for Maven? |
dongjoon-hyun
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.
+1, LGTM. Thank you, @sarutak .
Sure, I agree that the AS-IS approach is enough.
What changes were proposed in this pull request?
This PR proposes a new feature that allows developers to debug test code using JDWP with sbt an Maven.
More specifically, this PR introduces the following profile options.
jdwp-test-debug: An profile which controls enable/disable JDWP debugtest.jdwp.address: An option which corresponds toaddressoption in JDWPtest.jdwp.suspend: An option which corresponds tosuspendoption in JDWPtest.jdwp.server: An option which corresponds toserveroption in JDWPtest.debug.suite: An option which controls whether debug ScalaStyle suites (Maven only)For
sbt, this feature can be used likebuild/sbt -Pjdwp-test-debug -Dtest.jdwp.address=localhost:9876 -Dtest.jdwp.suspend=y -Dtest.jdwp.server=yand can be used for both JUnit tests and ScalaTest tests.For
Maven, this feature can be used like as follows:(For JUnit tests)
build/mvn -Pjdwp-test-debug -Dtest.jdwp.address=localhost:9876 -Dtest.jdwp.suspend=y -Dtest.jdwp.server=y(For ScalaTest suites)
build/mvn -Pjdwp-test-debug -Dtest.debug.suite=true -Dtest.jdwp.address=localhost:9876 -Dtest.jdwp.suspend=y -Dtest.jdwp.server=y(It might be useful to specify specific sub-modules like-pl sql/core,sql/catalyst).Why are the changes needed?
It's useful to debug test code.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
I confirmed the following things.
jdwp-tes-debugcan switch JDWP enabled/disabledtest.jdwp.addresscan change address and port.test.jdwp.suspendcan change the behavior that the target debugee suspends or not.test.jdwp.servercan change the behavior that the JDWP debugger run as a server or client.test.debug.suitetotrue.