Skip to content

Add JavaClientCodegen RxJava option tests#24203

Open
amirdeljouyi wants to merge 1 commit into
OpenAPITools:masterfrom
amirdeljouyi:pr-tests-javaclientcodegen
Open

Add JavaClientCodegen RxJava option tests#24203
amirdeljouyi wants to merge 1 commit into
OpenAPITools:masterfrom
amirdeljouyi:pr-tests-javaclientcodegen

Conversation

@amirdeljouyi

@amirdeljouyi amirdeljouyi commented Jul 5, 2026

Copy link
Copy Markdown

test: add JavaClientCodegen processOpts coverage

Hi,

I added a couple of focused processOpts() checks for JavaClientCodegen. They cover RxJava option normalization, including the case where RxJava 2 and 3 are both configured, and the explicit supportUrlQuery conversion for the Apache client.

The main covered areas are the RxJava handling at JavaClientCodegen.java:425-428 and the supportUrlQuery conversion at JavaClientCodegen.java:512-518. Branch coverage for JavaClientCodegen increases by about 2%.

I hope you find these tests useful. 😄 Please let me know if you have any questions or concerns.

Thanks,
Amir

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Add unit tests for JavaClientCodegen.processOpts to validate RxJava option handling and supportUrlQuery conversion for the Apache client. Tests cover the case where both RxJava2 and RxJava3 are set (RxJava3 wins) and ensure supportUrlQuery string values convert to booleans; branch coverage increases ~2%.

Written for commit 83cc8ca. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@wing328

wing328 commented Jul 6, 2026

Copy link
Copy Markdown
Member

thanks for the PR

shall we simply remove/deprecate the RxJava2 option ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants