Monilnarang opened a new pull request, #3511: URL: https://github.com/apache/amoro/pull/3511
## Why are the changes needed? - The same method call are repeated multiple times with different inputs in the test `testOptimizingStatusCodeValue` making it harder to maintain and extend. - When the test fails, JUnit only shows which type of assertion failed, but not which specific input caused the failure. - Adding new test cases requires copying and pasting new assertion instead of simply adding new data. - The test also had a completely independent testing logic related to the Number Of Optimizing Statuses. ## Brief change log Split the original test into 2 tests: `testNumberOfOptimizingStatuses` and a Parameterized test `testOptimizingStatusCodeValue ` This reduces duplication, allows easy extension by simply adding new value sets, and makes debugging easier as it clearly indicates which test failed instead of requiring a search through individual assertions. Test run report after change: <img width="418" alt="Screenshot 2025-04-12 at 2 12 22 PM" src="https://github.com/user-attachments/assets/639570fa-dbd8-4e3a-94b5-4cefa3cbd58c" /> ## How was this patch tested? - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [x] Add screenshots for manual tests if appropriate - [x] Run test locally before making a pull request ## Documentation - Does this pull request introduce a new feature? (yes / no) No - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
