Skip to content

fix issue in the new RC unit tests#1205

Open
rathovarun1032 wants to merge 3 commits into
mainfrom
fix-issue
Open

fix issue in the new RC unit tests#1205
rathovarun1032 wants to merge 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.

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.

1 participant