Update TestMultiValidationTokeFile token generation with no trailing newline char #9951
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.
Cherry-picks #9943
Description
The test does the following:
1.Randomly appends new-line character to the token value buffer
2. If #1 is done, it generates temp token file with buffer containing new-line character.
3. Also, it remember the original token for future validation
4. The code parse and read token-validation files and removes the new-line character as desired.
Failure in this case due to random buffer used to populate token value contained newline character which was used for validation, however, the file parse/read code as expected removed the newline character, hence causing the mismatch.
Patch addresses the concern by ensuring test generated random token-value has no trailing newline chars.
Testing
tests/fast/RandomUnitTests.toml -s 1355028229
(cherry picked from commit 8e52082)
Replace this text with your description here...
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branchormainif this is the youngest branch)