JinwooHwang opened a new pull request, #7984:
URL: https://github.com/apache/geode/pull/7984

   ## Problem
   `PulseSecurityWithSSLTest` intermittently failed on GitHub Actions with 
authentication errors (`BAD_CREDS`) despite using correct credentials. Tests 
consistently passed locally but failed in CI where JMX/Management Service 
initialization is slower.
   
   **Root Cause**: Race condition where authentication attempts occurred before 
ManagementService and MemberMXBean were fully initialized.
   
   ## Solution
   Added synchronization using `GeodeAwaitility.await()` to ensure 
ManagementService is ready before authentication:
   
   ```java
   ManagementService service = 
ManagementService.getExistingManagementService(locator.getLocator().getCache());
   await().untilAsserted(() -> 
assertThat(service.getMemberMXBean()).isNotNull());
   ```
   
   Applied to both test methods:
   - `loginWithIncorrectAndThenCorrectPassword`
   - `loginWithDeprecatedSSLOptions`
   
   This matches the pattern already used in `PulseSecurityIntegrationTest`.
   
   ## Testing
   - Both tests pass locally (27.7s total, 0 failures)
   - Code compiles and passes tests
   - No timing-dependent failures observed
   
   ## Impact
   - Eliminates flaky test behavior in CI
   - Improves test reliability and developer experience
   - No functional changes to production code
   
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline review of your contribution we ask that you
   ensure you've taken the following steps. -->
   
   ### For all changes, please confirm:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
   - [x] Is your initial contribution a single, squashed commit?
   - [x] Does `gradlew build` run cleanly?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to