-
Notifications
You must be signed in to change notification settings - Fork 62
Merge from main #471
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
Merged
Merge from main #471
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PiperOrigin-RevId: 860637485 Change-Id: Ibbd87902f4ef73e3620180ad870dc8200a40b417
PiperOrigin-RevId: 861206703 Change-Id: If6a63e7bae3d33e833cf752ee8313d88b9dffa86
PiperOrigin-RevId: 861740680 Change-Id: Ib18429fa3c4797b96e5c2bf74a5e7ff8b3f47ee9
PiperOrigin-RevId: 862378286 Change-Id: I140e95ffda132265f442bc1d222c587331e367d6
PiperOrigin-RevId: 862627023 Change-Id: I0b9936e67e4e7f3e73158b2d7f488af478132e2b
…iables and add a test. New Test Permutations We added new test cases to AppEngineWebXmlInitialParseTest.java to ensure full coverage of Runtime, Jetty, and Jakarta EE version combinations: testJava17WithExperimentEnableJetty12: Verifies that when the environment variable EXPERIMENT_ENABLE_JETTY12_FOR_JAVA is set to true for the java17 runtime (simulated via envProvider), the configuration correctly defaults to appengine.use.EE8=true (Jetty 12.0 in EE8 mode) instead of the standard Jetty 9.4 legacy mode. testHttpConnectorExperiment: Verifies that when EXPERIMENT_ENABLE_HTTP_CONNECTOR_FOR_JAVA is set to true, the system properties appengine.use.HttpConnector and appengine.ignore.cancelerror are automatically enabled. testJava17WithJetty121: Verifies that for the java17 runtime, enabling appengine.use.jetty121 alone does not inadvertently enable Jakarta EE 8, 10, or 11. It confirms that the configuration remains valid with only the Jetty 12.1 flag set. testJava17WithEE8AndJetty121: Verifies that for java17, explicitly enabling both appengine.use.EE8 and appengine.use.jetty121 correctly sets both properties to true, supporting the legacy EE8 environment on the newer Jetty infrastructure. testJava21WithEE10Explicit: Confirms that explicitly setting appengine.use.EE10 for java21 (which is the default) works as expected, ensuring EE10 is true and jetty121 remains false (mapping to Jetty 12.0). testJava21WithEE8AndJetty121: Verifies that for java21, combining appengine.use.EE8 with appengine.use.jetty121 correctly enables both flags. Environment Variable Emulation To reliably test logic dependent on environment variables (such as EXPERIMENT_ENABLE_JETTY12_FOR_JAVA or EXPERIMENT_ENABLE_HTTP_CONNECTOR_FOR_JAVA) without modifying the actual system environment or affecting other tests: The AppEngineWebXmlInitialParse class now accepts a custom envProvider (a UnaryOperator<String>) via the package-private setEnvProvider method. By default, this provider delegates to System::getenv. In tests, we inject a lambda function (e.g., key -> "true") to simulate specific environment variables being set. This allows us to verify that the parser correctly activates experimental features or defaults based on the environment. testSystemPropertyOverrideRuntime: This test sets the GAE_RUNTIME system property to "java21" (while the XML specifies "java17") and verifies that the runtime logic correctly switches to "java21" behavior (defaulting to EE10). This kills the mutant where runtimeId re-fetching from system properties (line 178) was removed, as the test would fail if runtimeId remained "java17". testSystemPropertyOverrideRuntimeWithWhitespace: This test sets GAE_RUNTIME to " java21 " (with whitespace) and asserts that the code correctly handles it as "java21" (setting EE10 to true). This kills the mutant where the trim() call (lines 179-181) was removed, as the test would fail if the whitespace prevented the "java21" logic from triggering. testLogEE8: This test captures the logs generated by AppEngineWebXmlInitialParse and asserts that "appengine.use.EE8=true" is logged when EE8 is enabled. This kills the mutant where the logging logic for EE8 (lines 249-251) was removed. PiperOrigin-RevId: 862787419 Change-Id: I1bc08a2ee06faa1018f0f225e8ca90f358cc094d
PiperOrigin-RevId: 863048007 Change-Id: I8215ddb729ffaf5e7012e9d7863a3bf03ea3cf14
PiperOrigin-RevId: 863263787 Change-Id: I5b7805c536e69fd544fc71edadd0d799e3e5c145
Update Jetty 12.0.x to 12.0.32 and Jetty 12.1.x to 12.1.6. Also, update the Jetty servlet API jar from 4.0.6 to 4.0.9 in the Jetty121EE8Sdk configuration. PiperOrigin-RevId: 864150501 Change-Id: Idc20a1e9abda7b10f9a0e695ad979d3e6cbaa7a2
PiperOrigin-RevId: 864153509 Change-Id: I5a6201ea0797834977208463488189474b472763
…ining internal tests to open source. PiperOrigin-RevId: 865415153 Change-Id: I26706754398304cfe4567583ffb84e0d9f2d73f1
…nd can be shared across all Jetty versions. PiperOrigin-RevId: 865965002 Change-Id: I04d68e5e83ee9219c20b4fac974070a400bbb662
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.