Skip to content

Commit 571b3d2

Browse files
committed
Fix test failures
1 parent 8f1b62c commit 571b3d2

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

src/EditorFeatures/TestUtilities/LanguageServer/AbstractLanguageServerProtocolTests.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,9 @@ public abstract class AbstractLanguageServerProtocolTests
3838
{
3939
// TODO: remove WPF dependency (IEditorInlineRenameService)
4040
private static readonly TestComposition s_composition = EditorTestCompositions.LanguageServerProtocolWpf
41-
.AddParts(typeof(TestLspWorkspaceRegistrationService))
4241
.AddParts(typeof(TestDocumentTrackingService))
4342
.RemoveParts(typeof(MockWorkspaceEventListenerProvider));
4443

45-
[Export(typeof(ILspWorkspaceRegistrationService)), PartNotDiscoverable]
46-
internal class TestLspWorkspaceRegistrationService : ILspWorkspaceRegistrationService
47-
{
48-
private Workspace? _workspace;
49-
50-
[ImportingConstructor]
51-
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
52-
public TestLspWorkspaceRegistrationService()
53-
{
54-
}
55-
56-
public ImmutableArray<Workspace> GetAllRegistrations()
57-
{
58-
Contract.ThrowIfNull(_workspace, "No workspace has been registered");
59-
60-
return ImmutableArray.Create(_workspace);
61-
}
62-
63-
public void Register(Workspace workspace)
64-
{
65-
Contract.ThrowIfTrue(_workspace != null);
66-
67-
_workspace = workspace;
68-
}
69-
}
70-
7144
private class TestSpanMapperProvider : IDocumentServiceProvider
7245
{
7346
TService IDocumentServiceProvider.GetService<TService>()

src/VisualStudio/LiveShare/Test/AbstractLiveShareRequestHandlerTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests
2121
public abstract class AbstractLiveShareRequestHandlerTests : AbstractLanguageServerProtocolTests
2222
{
2323
private static readonly TestComposition s_composition = LiveShareTestCompositions.Features.AddParts(
24-
typeof(MockDocumentNavigationServiceFactory),
25-
typeof(TestLspWorkspaceRegistrationService));
24+
typeof(MockDocumentNavigationServiceFactory));
2625

2726
private class MockHostProtocolConverter : IHostProtocolConverter
2827
{

src/Workspaces/CoreTestUtilities/TestExportJoinableTaskContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ private static (JoinableTaskContext joinableTaskContext, SynchronizationContext
6161
return (new JoinableTaskContext(mainThread, synchronizationContext), synchronizationContext);
6262
}
6363

64+
#pragma warning disable VSSDK005 // Use ThreadHelper.JoinableTaskContext singleton - N/A, used for test code
6465
[Export]
66+
#pragma warning restore VSSDK005 // Use ThreadHelper.JoinableTaskContext singleton - N/A, used for test code
6567
private JoinableTaskContext JoinableTaskContext
6668
{
6769
get;

0 commit comments

Comments
 (0)