jakartaee / rest

Jakarta RESTful Web Services
Other
351 stars 114 forks source link

fast-track: Add a TCK test to verify that the default ExceptionMapper can be overridden. #1235

Closed WhiteCat22 closed 3 months ago

WhiteCat22 commented 3 months ago

The nomapper tests seem to test the default ExceptionMapper, however, we could use a test to verify that the default ExceptionMapper can be overridden.

This test overrides the default ExceptionMapper to return status HTTP 512 instead of HTTP 500 and the test client verifies that status HTTP 512 is returned.

spericas commented 3 months ago

@WhiteCat22 Could you address the comments pls?

WhiteCat22 commented 3 months ago

I have some failures locally in the other related tests. So I don't think I can re-use this existing application for this test.

WhiteCat22 commented 3 months ago

I broke out the test into a new test and application to avoid breaking existing tests.

spericas commented 3 months ago

@alwin-joseph Could you verify the new version?

alwin-joseph commented 3 months ago

@alwin-joseph Could you verify the new version?

New test passes with Glassfish8.

WhiteCat22 commented 3 months ago

Addressed James' comments. Also, I tested this against OpenLiberty and it passes.

WhiteCat22 commented 3 months ago

@alwin-joseph Thank you!