atharva-kamat commented on PR #6063:
URL: https://github.com/apache/fineract/pull/6063#issuecomment-4845410611

   The CI/CD pipeline failed on 
ClientSearchTest.testClientSearchWorks_ByMobileNo. I want to clarify that this 
failure is entirely unrelated to the code changes introduced in this PR, but 
rather an intermittent validation bug in the existing test suite that my build 
unfortunately triggered.
   
   The Actual Cause:
   The Apache Fineract API strictly validates that a mobileNo must be between 7 
and 15 digits. The test relies on a utility method that parses a random numeric 
string into an Integer before converting it back to a string.
   
   Statistically, there is a 1% chance that the random generator picks two 
leading zeros (e.g., 00181504). When this happens, Java's integer parsing 
silently drops those leading zeros, truncating the phone number down to a 
6-digit string (181504). This causes Fineract to reject the payload with an 
HTTP 400 validation error.
   
   What I Did to Fix It:
   To unblock this PR and stabilize the build, I committed a fix to the test 
class that solves the integer-truncation bug by directly calling 
Utils.randomStringGenerator. This guarantees that an 8-character string remains 
exactly 8 characters long, permanently satisfying the API's regex.


-- 
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]

Reply via email to