-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[java] start the secure server only when needed in unit tests #14717
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
@NeedsSecureServer
to 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
@NeedsSecureServer
to conditionally start a secure server for specific test classes.InProcessTestEnvironment
andNettyAppServer
to support conditional secure server initialization.@NeedsSecureServer
annotation.JupiterTestBase
to handle secure server requirements dynamically.Changes walkthrough 📝
7 files
CookieImplementationTest.java
Add NeedsSecureServer annotation to CookieImplementationTest
java/test/org/openqa/selenium/CookieImplementationTest.java
@NeedsSecureServer
annotation to the test class.PageLoadingTest.java
Add NeedsSecureServer annotation to PageLoadingTest
java/test/org/openqa/selenium/PageLoadingTest.java
@NeedsSecureServer
annotation to the test class.NettyAppServerTest.java
Update NettyAppServerTest for non-secure server initialization
java/test/org/openqa/selenium/environment/webserver/NettyAppServerTest.java
NettyAppServer
without secure server.FederatedCredentialManagementTest.java
Add NeedsSecureServer annotation to FederatedCredentialManagementTest
java/test/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementTest.java
@NeedsSecureServer
annotation to the test class.RemoteWebDriverBiDiTest.java
Update RemoteWebDriverBiDiTest for non-secure server setup
java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java
NettyAppServer
without secureserver.
RemoteWebDriverDownloadTest.java
Update RemoteWebDriverDownloadTest for non-secure server setup
java/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java
NettyAppServer
without secure server.CrossDomainTest.java
Update CrossDomainTest for non-secure server setup
java/test/org/openqa/selenium/safari/CrossDomainTest.java
NettyAppServer
without secureserver.
5 files
InProcessTestEnvironment.java
Modify InProcessTestEnvironment to conditionally start secure server
java/test/org/openqa/selenium/environment/InProcessTestEnvironment.java
NettyAppServer.java
Conditional secure server initialization in NettyAppServer
java/test/org/openqa/selenium/environment/webserver/NettyAppServer.java
JavaScriptTestSuite.java
Update JavaScriptTestSuite for secure server and static lifecycle
java/test/org/openqa/selenium/javascript/JavaScriptTestSuite.java
JupiterTestBase.java
Enhance JupiterTestBase to conditionally use secure server
java/test/org/openqa/selenium/testing/JupiterTestBase.java
NeedsSecureServer.java
Introduce NeedsSecureServer annotation for test classes
java/test/org/openqa/selenium/testing/NeedsSecureServer.java
@NeedsSecureServer
for test classes.1 files
BUILD.bazel
Add NeedsSecureServer to Bazel build configuration
java/test/org/openqa/selenium/testing/BUILD.bazel
NeedsSecureServer.java
to the annotations source list.