-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix ConvertTo-Json test #8645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ConvertTo-Json test #8645
Conversation
| else | ||
| { | ||
| TypeInfo t = obj.GetType().GetTypeInfo(); | ||
| WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like the right fix to me. The verbose message was removed for a reason. If a test depended on the verbose message, then it (the test) should be removed or re-written.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the test could be rewritten not to depend on the verbose output. This could be part of WIP #8593 . This PR fixes the test before further changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just temporarily disable the test until #8593 is complete. It seems wrong to revert a previously approved change without good cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be best to use an InternalTestHook to get the cmdlet to write the VerboseMessage if the message is not useful outside of the test
| else | ||
| { | ||
| TypeInfo t = obj.GetType().GetTypeInfo(); | ||
| WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be best to use an InternalTestHook to get the cmdlet to write the VerboseMessage if the message is not useful outside of the test
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
This PR has been automatically closed because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it. |
|
Test marked as pending in #9458 |
Fix ConvertTo-Json test
PR Summary
Wait-UntilTruereturns$true.PR Context
8374a5c removed verbose output from
ConvertTo-Jsonwhich broke a test.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.[feature]to your commit messages if the change is significant or affects feature tests