fix: validate numeric part of --waitFor flag in test command#431
Open
A-d-i-t-y wants to merge 2 commits into
Open
fix: validate numeric part of --waitFor flag in test command#431A-d-i-t-y wants to merge 2 commits into
A-d-i-t-y wants to merge 2 commits into
Conversation
Previously --waitFor=sec or --waitFor=0sec would pass validation but cause unexpected behavior during execution. Now proper validation ensures: - Numeric part must be present (e.g. 5sec not sec) - Numeric part must be a valid integer - Value must be greater than zero Closes microcks#430 Signed-off-by: Aditya <aaaditya1909@gmail.com>
Author
|
Hi @Harsh4902 @Vaishnav88sk, I have raised this PR to fix the --waitFor flag validation as discussed in issue #430. Previously invalid values like --waitFor=sec or --waitFor=0sec would pass validation but cause unexpected behavior. This fix adds proper numeric validation with clear error messages. Would love your feedback! |
Member
|
@A-d-i-t-y There some merge conflicts. Can you please check and try to solve it? |
Author
|
Hi @Harsh4902, I have resolved the merge conflict. Please review again! |
This was referenced May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds proper validation for the numeric part of the --waitFor flag.
Problem
Current validation only checks the suffix (milli/sec/min) but not
the numeric part. This allows invalid values like:
These pass validation but cause unexpected behavior during execution.
Fix
Added validation that ensures:
Example error messages after fix
--waitFor=sec → "--waitFor value "sec" is missing numeric part (e.g. 5sec)"
--waitFor=0sec → "--waitFor value "0sec" must be greater than zero"
--waitFor=abcsec → "--waitFor value "abcsec" has invalid numeric part"
Files Changed
Closes #430