GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix ConvertTo-Json test by xtqqczze · Pull Request #8645 · PowerShell/PowerShell

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Jan 14, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix ConvertTo-Json test

PR Summary

  • Check that Wait-UntilTrue returns $true.
  • Revert 8374a5c: Remove one unneeded verbose output from 'ConvertTo-Json' (Remove WriteVerbose statement from ConvertTo-Json #7487) Brandon Olin (@devblackops)

PR Context

8374a5c removed verbose output from ConvertTo-Json which broke a test.

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed
      • Issue filed:
  • Testing - New and feature
    • N/A or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] to your commit messages if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
xtqqczze added 3 commits January 14, 2019 22:56
@xtqqczze
Wait-UntilTrue should not timeout
b8453b9
@xtqqczze
Revert "Remove one unneeded verbose output from 'ConvertTo-Json' (Pow…
232b48b
…erShell#7487)"

This reverts commit 8374a5c.
@xtqqczze
[Feature] Empty commit for CI
bcfe3d0
@xtqqczze
xtqqczze requested review from James Truher (JamesWTruher) and Paul Higinbotham (PaulHigin) as code owners January 14, 2019 23:10
@xtqqczze
[Feature] Remove blank line to fix CodeFactor issue
d773651
@iSazonov
Ilya (iSazonov) requested review from Steve Lee (SteveL-MSFT) and Aditya Patwardhan (adityapatwardhan) January 15, 2019 07:24
@iSazonov Ilya (iSazonov) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Jan 15, 2019
PaulHigin
Paul Higinbotham (PaulHigin) suggested changes Jan 15, 2019
View reviewed changes
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
else
{
TypeInfo t = obj.GetType().GetTypeInfo();
WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth));

@PaulHigin Paul Higinbotham (PaulHigin) Jan 15, 2019

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@xtqqczze xtqqczze Jan 15, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@PaulHigin Paul Higinbotham (PaulHigin) Jan 15, 2019

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

devblackops reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@SteveL-MSFT Steve Lee (SteveL-MSFT) Feb 2, 2019

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iSazonov Ilya (iSazonov) assigned Aditya Patwardhan (adityapatwardhan) Jan 17, 2019
@xtqqczze xtqqczze mentioned this pull request Jan 19, 2019
Refactor ConvertTo-Json to expose JsonObject.ConvertToJson as a public API #8682
Merged
6 of 11 tasks
@daxian-dbw
Dongbo Wang (daxian-dbw) self-requested a review January 21, 2019 02:11
SteveL-MSFT
Steve Lee (SteveL-MSFT) requested changes Feb 2, 2019
View reviewed changes
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
else
{
TypeInfo t = obj.GetType().GetTypeInfo();
WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth));

@SteveL-MSFT Steve Lee (SteveL-MSFT) Feb 2, 2019

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stale

stale Bot commented Mar 4, 2019

Copy link
Copy Markdown

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.
Thank you for your contributions.
Community members are welcome to grab these works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale stale Bot added the Stale label Mar 4, 2019
@stale

stale Bot commented Mar 14, 2019

Copy link
Copy Markdown

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.
Thanks again for your contribution.
Community members are welcome to grab these works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale stale Bot closed this Mar 14, 2019
@xtqqczze

xtqqczze commented Apr 24, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Test marked as pending in #9458

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze xtqqczze mentioned this pull request Apr 26, 2019
Ensure Wait-UntilTrue returns $true in Pester tests #9458
Merged
7 tasks done
@xtqqczze
xtqqczze deleted the fix-ConvertTo-Json.Tests branch May 24, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SteveL-MSFT Steve Lee (SteveL-MSFT) SteveL-MSFT requested changes
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Awaiting requested review from adityapatwardhan
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
+1 more reviewer
@PaulHigin Paul Higinbotham (PaulHigin) PaulHigin requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log Stale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@xtqqczze @SteveL-MSFT @PaulHigin @adityapatwardhan @iSazonov
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.