Skip to content

chore: Fix issue in the new RC unit tests#1205

Merged
rathovarun1032 merged 3 commits into
mainfrom
fix-issue
May 13, 2026
Merged

chore: Fix issue in the new RC unit tests#1205
rathovarun1032 merged 3 commits into
mainfrom
fix-issue

Conversation

@rathovarun1032
Copy link
Copy Markdown
Contributor

fix(rc): Throw IllegalArgumentException for invalid template JSON

The ServerTemplateImpl constructor was catching template parsing
exceptions and only printing the stack trace to stderr. This resulted
in noisy console output during unit tests, even when the tests passed.

This change updates the constructor to throw an IllegalArgumentException
when a provided cachedTemplate fails to parse.

Updated testEvaluateWithInvalidCacheValueThrowsException to assert
this new behavior.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the ServerTemplateImpl constructor to throw an IllegalArgumentException when JSON parsing fails, replacing a simple stack trace print. Correspondingly, the unit tests have been updated to verify that this exception is thrown during the template building phase and that it contains the correct cause and message. I have no feedback to provide.

Copy link
Copy Markdown
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@lahirumaramba lahirumaramba changed the title fix issue in the new RC unit tests chore: Fix issue in the new RC unit tests May 13, 2026
@rathovarun1032 rathovarun1032 merged commit 2d7c8d9 into main May 13, 2026
12 checks passed
@lahirumaramba lahirumaramba deleted the fix-issue branch May 13, 2026 17:14
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