Monilnarang opened a new pull request, #3450: URL: https://github.com/apache/amoro/pull/3450
## Why are the changes needed? - In the test testUnitConversion the same order of method calls (getBytes, getKibiBytes, getMebiBytes, . . . ) are repeated multiple times with different inputs, making the test harder to maintain and extend. - Multiple such clusters of the above method calls are cluttered together in one test, blurring the exact scope of this test. - When a test fails, JUnit only shows which assertion failed, but not which specific input caused the failure. - Adding new test cases requires copying and pasting the whole block instead of simply adding new data. ## Brief change log Parameterized testUnitConversion 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 before changes: <img width="382" alt="Screenshot 2025-02-28 at 1 45 20 PM" src="https://github.com/user-attachments/assets/1a816673-68b6-458d-a075-f28d4e52d72a" /> Test Run report after changes: <img width="610" alt="Screenshot 2025-02-28 at 1 45 50 PM" src="https://github.com/user-attachments/assets/4ffe3412-f89e-4f66-af81-0b8f0be84754" /> ## How was this patch tested? - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] 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]
