-
Notifications
You must be signed in to change notification settings - Fork 624
dataconnect: fix flaky test that ensures deserialize() throws IllegalArgumentException on invalid input #6839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…numbers as "invalid" characters because they become "valid" when adjacent to other numeric digits.
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
2 similar comments
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected ProductsNo changes between base commit (a0a02a7) and merge commit (d04bb32).Test Logs |
Test Results 66 files - 968 66 suites - 968 1m 11s ⏱️ - 33m 8s Results for commit 7a500d1. ± Comparison against base commit a0a02a7. This pull request removes 5320 tests.
|
Size Report 1Affected ProductsNo changes between base commit (a0a02a7) and merge commit (d04bb32).Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Fix
unparseableDash()
inLocalDateSerializerUnitTest.kt
to not include numbers in the set of "invalid" characters because they become "valid" when adjacent to other numeric digits. In certain situations, using a "digit" as an invalid character was causing flaky test failures such as this one indeserialize() should throw IllegalArgumentException when given unparseable strings
:Note that the string
"96-082895-312"
is 3 valid numbers separated by dashes and, therefore, is successfully parsed as a date. The"-0"
was the string produced byunparseableDash()
which, when combined with the rest of the string, did not, in fact, produce an unparseable dash.