Skip to content

Add tests for invalid and edge cases in DurationValidator#7287

Merged
shakuzen merged 1 commit intomicrometer-metrics:1.15.xfrom
Joowon-Seo:add-duration-validator-tests-115x
Mar 13, 2026
Merged

Add tests for invalid and edge cases in DurationValidator#7287
shakuzen merged 1 commit intomicrometer-metrics:1.15.xfrom
Joowon-Seo:add-duration-validator-tests-115x

Conversation

@Joowon-Seo
Copy link
Copy Markdown
Contributor

@Joowon-Seo Joowon-Seo commented Mar 13, 2026

DurationValidator validates externally supplied duration configuration values. Existing tests cover only successful parsing scenarios.

This change adds tests for several invalid and boundary inputs:

  • blank values
  • malformed duration strings
  • missing units
  • invalid units
  • invalid ISO8601 durations
  • null values

These tests improve coverage of validation paths and help prevent regressions in configuration parsing.

This PR supersedes #7286 and rebases the change on top of the 1.15.x branch as requested.

DurationValidator validates externally supplied duration configuration
values. Existing tests cover only successful parsing scenarios.

This change adds tests for several invalid and boundary inputs:
- blank values
- malformed duration strings
- missing units
- invalid units
- invalid ISO8601 durations
- null values

These tests improve coverage of validation paths and help prevent
regressions in configuration parsing.

Signed-off-by: Joowon-Seo <[email protected]>
@shakuzen shakuzen added type: task A general task module: micrometer-core An issue that is related to our core module labels Mar 13, 2026
@shakuzen shakuzen added this to the 1.15.11 milestone Mar 13, 2026
@shakuzen shakuzen merged commit 328f379 into micrometer-metrics:1.15.x Mar 13, 2026
9 checks passed
etrandafir93 pushed a commit to etrandafir93/micrometer that referenced this pull request Mar 21, 2026
…-metrics#7287)

DurationValidator validates externally supplied duration configuration
values. Existing tests cover only successful parsing scenarios.

This change adds tests for several invalid and boundary inputs:
- blank values
- malformed duration strings
- missing units
- invalid units
- invalid ISO8601 durations
- null values

These tests improve coverage of validation paths and help prevent
regressions in configuration parsing.

Signed-off-by: Joowon-Seo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: micrometer-core An issue that is related to our core module type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants