-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java] start the secure server only when needed in unit tests #14717
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
6deb0dc to
1c11875
Compare
1c11875 to
c50754f
Compare
|
LGTM. Thank you so much! This helps a lot. @joerg1985 |
User description
Description
This PR will add the
@NeedsSecureServerto avoid starting the secure server in most of the unit tests.Motivation and Context
Only ~5 classes need the secure server, all others do not need the secure server.
Starting the secure server is consuming alot of CPU to generate new SSL certificate.
Types of changes
Checklist
PR Type
enhancement, tests
Description
@NeedsSecureServerto conditionally start a secure server for specific test classes.InProcessTestEnvironmentandNettyAppServerto support conditional secure server initialization.@NeedsSecureServerannotation.JupiterTestBaseto handle secure server requirements dynamically.Changes walkthrough 📝
7 files
CookieImplementationTest.java
Add NeedsSecureServer annotation to CookieImplementationTestjava/test/org/openqa/selenium/CookieImplementationTest.java
@NeedsSecureServerannotation to the test class.PageLoadingTest.java
Add NeedsSecureServer annotation to PageLoadingTestjava/test/org/openqa/selenium/PageLoadingTest.java
@NeedsSecureServerannotation to the test class.NettyAppServerTest.java
Update NettyAppServerTest for non-secure server initializationjava/test/org/openqa/selenium/environment/webserver/NettyAppServerTest.java
NettyAppServerwithout secure server.FederatedCredentialManagementTest.java
Add NeedsSecureServer annotation to FederatedCredentialManagementTestjava/test/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementTest.java
@NeedsSecureServerannotation to the test class.RemoteWebDriverBiDiTest.java
Update RemoteWebDriverBiDiTest for non-secure server setupjava/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java
NettyAppServerwithout secureserver.
RemoteWebDriverDownloadTest.java
Update RemoteWebDriverDownloadTest for non-secure server setupjava/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java
NettyAppServerwithout secure server.CrossDomainTest.java
Update CrossDomainTest for non-secure server setupjava/test/org/openqa/selenium/safari/CrossDomainTest.java
NettyAppServerwithout secureserver.
5 files
InProcessTestEnvironment.java
Modify InProcessTestEnvironment to conditionally start secure serverjava/test/org/openqa/selenium/environment/InProcessTestEnvironment.java
NettyAppServer.java
Conditional secure server initialization in NettyAppServerjava/test/org/openqa/selenium/environment/webserver/NettyAppServer.java
JavaScriptTestSuite.java
Update JavaScriptTestSuite for secure server and static lifecyclejava/test/org/openqa/selenium/javascript/JavaScriptTestSuite.java
JupiterTestBase.java
Enhance JupiterTestBase to conditionally use secure serverjava/test/org/openqa/selenium/testing/JupiterTestBase.java
NeedsSecureServer.java
Introduce NeedsSecureServer annotation for test classesjava/test/org/openqa/selenium/testing/NeedsSecureServer.java
@NeedsSecureServerfor test classes.1 files
BUILD.bazel
Add NeedsSecureServer to Bazel build configurationjava/test/org/openqa/selenium/testing/BUILD.bazel
NeedsSecureServer.javato the annotations source list.