Skip to content

refactor: graphql test return message - #2215

Merged
lbroudoux merged 2 commits into
microcks:masterfrom
A-Deepak1610:refactor/graphql-test-return-message
Aug 5, 2026
Merged

lbroudoux merged 2 commits into
microcks:masterfrom
A-Deepak1610:refactor/graphql-test-return-message

Conversation

@A-Deepak1610

Copy link
Copy Markdown
Contributor

Description

Fixed incorrect newline formatting in GraphQL test validation error messages in GraphQLTestRunner.

  • Previously, validation errors were concatenated using the literal string "/n" instead of a proper newline character, producing malformed output.
  • Replaced manual StringBuilder concatenation with String.join(System.lineSeparator(), ...) for clearer, more idiomatic error message construction.
  • Wrapped the logic in a finally block to guarantee lastValidationErrors is reset after consumption, avoiding potential state leakage between test runs.

Testing

Verified locally via mvn clean install and mvn spotless:check — build passes with no formatting violations.

Related issue(s)

No related issue — found while reviewing the codebase.

Copilot AI review requested due to automatic review settings July 9, 2026 19:04
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

👋 @A-Deepak1610

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

@A-Deepak1610 A-Deepak1610 changed the title Refactor/graphql test return message refactor: graphql test return message Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors GraphQLTestRunner#extractTestReturnMessage to generate GraphQL schema validation error messages with proper newline separators and to ensure lastValidationErrors is reliably cleared after use, preventing cross-run state leakage.

Changes:

  • Fix newline formatting by replacing the literal "/n" concatenation with String.join(System.lineSeparator(), ...).
  • Simplify message construction by removing manual StringBuilder logic.
  • Guarantee lastValidationErrors is reset via a finally block after message extraction.

@A-Deepak1610

Copy link
Copy Markdown
Contributor Author

Is there any update on this pr

@lbroudoux lbroudoux added kind/task component/tests java Pull requests that update Java code labels Aug 5, 2026
@lbroudoux lbroudoux added this to the 1.15.0 milestone Aug 5, 2026
@lbroudoux
lbroudoux merged commit 5daa2dd into microcks:master Aug 5, 2026
14 of 15 checks passed
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🎉 @A-Deepak1610

You are now a Microcks community contributor! 💖

Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏

📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

Kudos and please keep going, we need you 🙌

lbroudoux pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: A-Deepak1610 <[email protected]>
Co-authored-by: A-Deepak1610 <[email protected]>
(cherry picked from commit 5daa2dd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/tests java Pull requests that update Java code kind/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants