Skip to content

Deflake JmsIO authentication tests - #39920

Open
bvolpato wants to merge 1 commit into
apache:masterfrom
bvolpato:bvolpato/deflake-jms-authentication
Open

Deflake JmsIO authentication tests#39920
bvolpato wants to merge 1 commit into
apache:masterfrom
bvolpato:bvolpato/deflake-jms-authentication

Conversation

@bvolpato

Copy link
Copy Markdown
Contributor

The JmsIOTest authentication assertions can fail even though the broker correctly rejects unauthenticated connections. This occurred in the Java IOs precommit: ActiveMQ logged the expected authentication failure, but the test observed peer (...) stopped.

Cause

Queue reads split into multiple concurrent sources. After one reader reports the expected authentication error, DirectRunner cancels the pipeline and the fixture stops the broker while other readers are still connecting. Depending on timing, the pipeline can surface a secondary transport shutdown instead of the original security error.

Fix

Use a topic for the two authentication tests. Topics produce one UnboundedJmsSource, removing the concurrent-failure race while preserving end-to-end pipeline coverage for missing and invalid credentials with both ActiveMQ and Qpid. Existing tests continue to cover queue splitting and queue reads.

Validation

./gradlew :sdks:java:io:jms:spotlessCheck :sdks:java:io:jms:cleanTest :sdks:java:io:jms:test

The full 70-test JMS suite passed. Both authentication tests also passed in 20 consecutive clean executions.


  • Linked the failing workflow run above; no issue is associated.
  • CHANGES.md is unchanged because this is a test-only fix.
  • This contribution is small and does not require an ICLA update.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label java.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant