ACES-11360 Fix Int Test: ISO 19115 roundtrip strips trailing whitespace from Quality.QualityContentDetails.Strengths - #2461
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2461 +/- ##
=======================================
Coverage 57.90% 57.91%
=======================================
Files 1073 1073
Lines 74616 74623 +7
Branches 2169 2167 -2
=======================================
+ Hits 43209 43217 +8
- Misses 29379 29380 +1
+ Partials 2028 2026 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ;; expected output with the result of the actual conversions. This test runs a record | ||
| ;; through all of the supported formats. | ||
| (deftest roundtrip-generated-collection-records-with-seed | ||
| (checking-with-seed "collection round tripping seed" 100 1496683985472 |
There was a problem hiding this comment.
I am willing to remove this change. I changed the value to the seed value that reproduces the issue.
There was a problem hiding this comment.
Yeah, the original seed number also tested a specific issue from years ago. I think I am OK leaving it here as is or removing the checking-with-seed, but if we do remove this test, document on line 216 how to add a seed number because I won't remember how to do it when the time comes to use a different seed number to reproduce an error. With this test and the one above, 200 tests are run using "random" values in the schema elements. It just seems excessive to use 100 different tests, but on the other hand the tests "catch" these types of issues - although now we are coding to the test and not necessarily what the end user cares about.
eereiter
left a comment
There was a problem hiding this comment.
We should "fix" this issue in the expected conversion test code.
…ed quality detail fields by restoring the raw content if parsing trim caused whitespace loss.
…so trimmed quality details like Strength are expected to be trimmed.
Overview
What is the objective?
This PR addresses where ISO 19115 roundtrips were silently removing trailing whitespace from
QualityContentDetails.Strengths(and similar terminal quality detail fields) by aligning expected normalization to trim-based behavior.What are the changes?
Updated test helper
expected-qualityinumm-spec-lib/src/cmr/umm_spec/test/iso_shared.cljto::QualityContentDetailsvalue:QualityContentDetailswhen empty after normalizationUpdated XML→UMM quality unit tests to match trim-normalized behavior and removed redundant edge-whitespace cases.
Updated UMM→XML quality unit test expectation to match normalized serialized output behavior.
Updated seeded generative roundtrip test in
umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.cljfrom1496683985472to1783446834701for deterministic reproduction of the original issue.What areas of the application does this impact?
Required Checklist
Additional Checklist