ruthst00 commented on PR #6772:
URL: https://github.com/apache/jmeter/pull/6772#issuecomment-5844530967
@vlsi, thanks again for your feedback. Very valuable. All changes you
requested have been implemented:
**`TestBoundaryExtractor.java`:**
- Dropped `testMatchNumberZeroRandomSingleMatch` (already covered by
`BoundaryExtractorTest.kt`'s `ExtractCase(1..1, 0, ...)` and the existing
`extract random from variable` Kotlin test checks `varname_matchNr` is null)
- Renamed `testMatchNumberZeroRandomMultipleMatches` →
`testMatchNumberZeroMultipleMatches` (removed "Random" since the test doesn't
verify randomness), removed the redundant `assertNotNull`, and replaced the `a
|| b || c` assertTrue with `Set.of("A","B","C").contains(found)`
- Replaced `testEmptyMatchNumberFieldBehavesLikeZero` with
`testEmptyMatchNumber` which: (1) deterministically checks `assertEquals(0,
extractor.getMatchNumber())` after `setMatchNumber("")`, and (2) behaviorally
verifies that empty field acts like 0 (not -1) by asserting `varname` is set
but `varname_1` and `varname_matchNr` are not
- Fixed the comment to say "An empty Match No. is treated as 0." instead of
describing the implementation
**`TestRegexExtractor.java`:**
- Replaced `testEmptyMatchNumberFieldBehavesLikeZero` with
`testEmptyMatchNumber` which simply calls `extractor.setMatchNumber("")` and
asserts `assertEquals(0, extractor.getMatchNumber())` — a check that can
actually fail if the behavior changes
The `component_reference.xml` was already correct (all three sections —
Regex, CSS/JQuery, Boundary — already had `required="No"` and the `<li>An empty
field is treated as <code>0</code>.</li>` line). Build and style checks passed
cleanly.
--
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]