mxtymoshyk opened a new issue, #40289: URL: https://github.com/apache/beam/issues/40289
### What happened? `JmsIOTest.testAuthenticationWithBadPassword` (ActiveMQ parameter) fails intermittently in `beam_PreCommit_Java_IOs_Direct` on PRs that don't touch JmsIO. Example run: https://github.com/apache/beam/actions/runs/36177335884/job/108211021658 ``` JmsIOTest > testAuthenticationWithBadPassword[with client class class org.apache.activemq.ActiveMQConnectionFactory] FAILED java.lang.AssertionError: Expected: a string containing "User name [test_user] or password is invalid." but: was "peer (vm://localhost:43505?transport.transformer=jms#97) stopped." ``` When a login fails, the ActiveMQ broker schedules its side of the connection to stop shortly afterwards. The `vm://` transport is async by default, so the security error reply can still be waiting on the client side. If the runner is short on CPU (the same job also logged `java.net.SocketTimeoutException: Connect timed out`), the broker side stops first. `connection.start()` (https://github.com/apache/beam/blob/011e1b33e24b0eb68be225e4e4f845348d6c57bd/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java#L774) then fails with the `peer ... stopped.` error instead of the auth error that the test checks for (https://github.com/apache/beam/blob/011e1b33e24b0eb68be225e4e4f845348d6c57bd/sdks/java/io/jms/src/test/java/org/apache/beam/sdk/io/jms/JmsIOTest.java#L184-L217). Proposed fix, either of: - Make the test connections use a synchronous `vm://` transport (`?async=false`), so the error reply is delivered before the broker stops the connection. - Relax the assertion to accept the `stopped.` message for ActiveMQ. Earlier deflake: #39920 switched the auth tests to a topic. This race is still there. ### Issue Failure Failure: Test is flaky ### Issue Priority Priority: 2 (backlog / disabled test but we think the product is healthy) ### Issue Components - [x] Component: Java SDK - [x] Component: IO connector -- 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]
