From b8453b968ab6e68f601b0faff71b0747dd44255e Mon Sep 17 00:00:00 2001
From: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Date: Mon, 14 Jan 2019 22:56:57 +0000
Subject: [PATCH 1/4] Wait-UntilTrue should not timeout
---
.../Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
index 198cccf5964..8de65fe9e15 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
@@ -32,7 +32,7 @@ Describe 'ConvertTo-Json' -tags "CI" {
})
$null = $ps.BeginInvoke()
# wait for verbose message from ConvertTo-Json to ensure cmdlet is processing
- Wait-UntilTrue { $ps.Streams.Verbose.Count -gt 0 }
+ Wait-UntilTrue { $ps.Streams.Verbose.Count -gt 0 } | Should -BeTrue
$null = $ps.BeginStop($null, $null)
# wait a bit to ensure state has changed, not using synchronous Stop() to avoid blocking Pester
Start-Sleep -Milliseconds 100
From 232b48bdc6380ba326ebc2ebdfe6e3a8a57017f4 Mon Sep 17 00:00:00 2001
From: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Date: Mon, 14 Jan 2019 22:57:08 +0000
Subject: [PATCH 2/4] Revert "Remove one unneeded verbose output from
'ConvertTo-Json' (#7487)"
This reverts commit 8374a5c97dbdf2367f9db3a6cde74ca3df14d224.
---
.../commands/utility/WebCmdlet/ConvertToJsonCommand.cs | 2 ++
.../resources/UtilityCommonStrings.resx | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
index d179a8c4feb..13f320b238b 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
@@ -204,6 +204,8 @@ private object ProcessValue(object obj, int depth)
else
{
TypeInfo t = obj.GetType().GetTypeInfo();
+ WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth));
+
if (t.IsPrimitive)
{
diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx
index 551f0d1fcb8..1cfd4750a3e 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx
+++ b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx
@@ -174,4 +174,7 @@
Cannot construct a security descriptor from the given SDDL due to the following error: {0}
+
+ Processing object of type [{0}] at depth {1}
+
From bcfe3d04f4731b8cbcc053f1260817722b9556d6 Mon Sep 17 00:00:00 2001
From: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Date: Mon, 14 Jan 2019 23:09:05 +0000
Subject: [PATCH 3/4] [Feature] Empty commit for CI
From d7736514877b65370a93922eb0ffb150fe2bf12f Mon Sep 17 00:00:00 2001
From: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Date: Mon, 14 Jan 2019 23:12:58 +0000
Subject: [PATCH 4/4] [Feature] Remove blank line to fix CodeFactor issue
---
.../commands/utility/WebCmdlet/ConvertToJsonCommand.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
index 13f320b238b..1de50798b42 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs
@@ -206,7 +206,6 @@ private object ProcessValue(object obj, int depth)
TypeInfo t = obj.GetType().GetTypeInfo();
WriteVerbose(StringUtil.Format(UtilityCommonStrings.ConvertToJsonProcessValueVerboseMessage, t.Name, depth));
-
if (t.IsPrimitive)
{
rv = obj;