From df10b2ea6c94c385bb8f17b94d82172bbf2cda2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:38:19 +0000 Subject: [PATCH 1/2] Bump the xunit group with 1 update Bumps the xunit group with 1 update: [xunit](https://github.com/xunit/xunit). Updates `xunit` from 2.6.6 to 2.7.0 - [Commits](https://github.com/xunit/xunit/compare/2.6.6...2.7.0) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: xunit ... Signed-off-by: dependabot[bot] --- .../PowerShellEditorServices.Test.E2E.csproj | 2 +- .../packages.lock.json | 38 ++--- .../PowerShellEditorServices.Test.csproj | 2 +- .../packages.lock.json | 154 +++++++++--------- 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj index 77eacbd87..ec30df02e 100644 --- a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj +++ b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj @@ -9,7 +9,7 @@ - + diff --git a/test/PowerShellEditorServices.Test.E2E/packages.lock.json b/test/PowerShellEditorServices.Test.E2E/packages.lock.json index 59dfb28f8..91fccbf9e 100644 --- a/test/PowerShellEditorServices.Test.E2E/packages.lock.json +++ b/test/PowerShellEditorServices.Test.E2E/packages.lock.json @@ -41,13 +41,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -444,37 +444,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { diff --git a/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj b/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj index f77593613..548f36c3e 100644 --- a/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj +++ b/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj @@ -38,7 +38,7 @@ - + diff --git a/test/PowerShellEditorServices.Test/packages.lock.json b/test/PowerShellEditorServices.Test/packages.lock.json index 708461b71..35e73f2b9 100644 --- a/test/PowerShellEditorServices.Test/packages.lock.json +++ b/test/PowerShellEditorServices.Test/packages.lock.json @@ -28,13 +28,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -496,37 +496,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -596,13 +596,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -1631,37 +1631,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -1735,13 +1735,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -2754,37 +2754,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -2854,13 +2854,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -3880,37 +3880,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -3939,4 +3939,4 @@ } } } -} +} \ No newline at end of file From 2cb3adf4d6843c077cae2b1d7265f9a6faf3e104 Mon Sep 17 00:00:00 2001 From: Brad Wilson Date: Tue, 9 Apr 2024 14:29:47 -0700 Subject: [PATCH 2/2] Fix deadlocks in tests when there's no sync context Patch provided in https://github.com/xunit/xunit/issues/2912 --- .../Debugging/DebugServiceTests.cs | 11 ++++----- .../Extensions/ExtensionCommandTests.cs | 20 +++++----------- .../Language/CompletionHandlerTests.cs | 13 ++++------ .../Language/SymbolsServiceTests.cs | 12 ++++------ .../Session/PsesInternalHostTests.cs | 24 +++++++------------ 5 files changed, 28 insertions(+), 52 deletions(-) diff --git a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs index 30b020c30..e1311f1a3 100644 --- a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs @@ -33,7 +33,7 @@ internal class TestReadLine : IReadLine } [Trait("Category", "DebugService")] - public class DebugServiceTests : IDisposable + public class DebugServiceTests : IAsyncLifetime { private readonly PsesInternalHost psesHost; private readonly BreakpointService breakpointService; @@ -76,14 +76,13 @@ public DebugServiceTests() variableScriptFile = GetDebugScript("VariableTest.ps1"); } - public void Dispose() + public Task InitializeAsync() => Task.CompletedTask; + + public async Task DisposeAsync() { debugService.Abort(); debuggerStoppedQueue.Dispose(); -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); + await Task.Run(psesHost.StopAsync); } /// diff --git a/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs b/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs index 190ee5aae..c4958ce8e 100644 --- a/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs +++ b/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs @@ -20,13 +20,13 @@ namespace PowerShellEditorServices.Test.Extensions { [Trait("Category", "Extensions")] - public class ExtensionCommandTests : IDisposable + public class ExtensionCommandTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; + private PsesInternalHost psesHost; - private readonly ExtensionCommandService extensionCommandService; + private ExtensionCommandService extensionCommandService; - public ExtensionCommandTests() + public async Task InitializeAsync() { psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); ExtensionService extensionService = new( @@ -34,19 +34,11 @@ public ExtensionCommandTests() serviceProvider: null, editorOperations: null, executionService: psesHost); -#pragma warning disable VSTHRD002 - extensionService.InitializeAsync().Wait(); -#pragma warning restore VSTHRD002 + await extensionService.InitializeAsync(); extensionCommandService = new(extensionService); } - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanRegisterAndInvokeCommandWithCmdletName() diff --git a/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs b/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs index fae0f8104..3406cbb41 100644 --- a/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs +++ b/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -21,7 +20,7 @@ namespace PowerShellEditorServices.Test.Language { [Trait("Category", "Completions")] - public class CompletionHandlerTests : IDisposable + public class CompletionHandlerTests : IAsyncLifetime { private readonly PsesInternalHost psesHost; private readonly WorkspaceService workspace; @@ -34,13 +33,9 @@ public CompletionHandlerTests() completionHandler = new PsesCompletionHandler(NullLoggerFactory.Instance, psesHost, psesHost, workspace); } - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public Task InitializeAsync() => Task.CompletedTask; + + public async Task DisposeAsync() => await Task.Run(psesHost.StopAsync); private ScriptFile GetScriptFile(ScriptRegion scriptRegion) => workspace.GetFile(TestUtilities.GetSharedPath(scriptRegion.File)); diff --git a/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs b/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs index f078d8d42..52c217299 100644 --- a/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; @@ -30,7 +29,7 @@ namespace PowerShellEditorServices.Test.Language { [Trait("Category", "Symbols")] - public class SymbolsServiceTests : IDisposable + public class SymbolsServiceTests : IAsyncLifetime { private readonly PsesInternalHost psesHost; private readonly WorkspaceService workspace; @@ -53,14 +52,13 @@ public SymbolsServiceTests() new ConfigurationService()); } - public void Dispose() + public Task InitializeAsync() => Task.CompletedTask; + + public async Task DisposeAsync() { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().GetAwaiter().GetResult(); -#pragma warning restore VSTHRD002 + psesHost.StopAsync(); CommandHelpers.s_cmdletToAliasCache.Clear(); CommandHelpers.s_aliasToCmdletCache.Clear(); - GC.SuppressFinalize(this); } private static void AssertIsRegion( diff --git a/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs b/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs index d489704f4..eb316be89 100644 --- a/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs +++ b/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs @@ -20,19 +20,15 @@ namespace PowerShellEditorServices.Test.Session using System.Management.Automation.Runspaces; [Trait("Category", "PsesInternalHost")] - public class PsesInternalHostTests : IDisposable + public class PsesInternalHostTests : IAsyncLifetime { private readonly PsesInternalHost psesHost; public PsesInternalHostTests() => psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public Task InitializeAsync() => Task.CompletedTask; + + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanExecutePSCommand() @@ -238,19 +234,15 @@ public async Task CanHandleBadInitialWorkingDirectory(string path) } [Trait("Category", "PsesInternalHost")] - public class PsesInternalHostWithProfileTests : IDisposable + public class PsesInternalHostWithProfileTests : IAsyncLifetime { private readonly PsesInternalHost psesHost; public PsesInternalHostWithProfileTests() => psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance, loadProfiles: true); - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public Task InitializeAsync() => Task.CompletedTask; + + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanResolveAndLoadProfilesForHostId()