Skip to content

Commit 6f58efc

Browse files
rollback changes from wip commit
1 parent 93ead30 commit 6f58efc

File tree

6 files changed

+9
-66
lines changed

6 files changed

+9
-66
lines changed

src/JsonRpc/SchedulerContainer.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/Lsp.Tests/Integration/CustomRequestsTests.cs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ public async Task Should_Support_Custom_Telemetry_Using_Base_Class()
3434
PromptToUpdatePackageManagement = false
3535
};
3636
server.SendTelemetryEvent(@event);
37-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
38-
await SettleNext();
37+
await SettleNext();
3938

4039
var call = fake.ReceivedCalls().Single();
4140
var args = call.GetArguments();
4241

4342
args[0].Should().BeOfType<CustomTelemetryEventParams>()
4443
.And.Subject
45-
.Should().BeEquivalentTo(@event, z=> z.UsingStructuralRecordEquality().Excluding(x => x.ExtensionData));
44+
.Should().BeEquivalentTo(@event, z => z.UsingStructuralRecordEquality().Excluding(x => x.ExtensionData));
4645
}
4746

4847
[RetryFact]
@@ -59,8 +58,7 @@ public async Task Should_Support_Custom_Telemetry_Receiving_Regular_Telemetry_Us
5958
PromptToUpdatePackageManagement = false
6059
};
6160
server.SendTelemetryEvent(@event);
62-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
63-
await SettleNext();
61+
await SettleNext();
6462

6563
var call = fake.ReceivedCalls().Single();
6664
var args = call.GetArguments();
@@ -76,7 +74,7 @@ public async Task Should_Support_Custom_Telemetry_Receiving_Regular_Telemetry_Us
7674
public async Task Should_Support_Custom_Telemetry_Using_Extension_Data_Using_Base_Class()
7775
{
7876
var fake = Substitute.For<TelemetryEventHandlerBase<CustomTelemetryEventParams>>();
79-
var (_, server) = await Initialize(options => { options.AddHandler(fake);}, options => { });
77+
var (_, server) = await Initialize(options => { options.AddHandler(fake); }, options => { });
8078

8179
server.SendTelemetryEvent(
8280
new TelemetryEventParams {
@@ -89,7 +87,6 @@ public async Task Should_Support_Custom_Telemetry_Using_Extension_Data_Using_Bas
8987
}
9088
}
9189
);
92-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
9390
await SettleNext();
9491

9592
var call = fake.ReceivedCalls().Single();
@@ -116,15 +113,14 @@ public async Task Should_Support_Custom_Telemetry_Using_Delegate()
116113
PromptToUpdatePackageManagement = false
117114
};
118115
server.SendTelemetryEvent(@event);
119-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
120-
await SettleNext();
116+
await SettleNext();
121117

122118
var call = fake.ReceivedCalls().Single();
123119
var args = call.GetArguments();
124120
args[0]
125121
.Should().BeOfType<CustomTelemetryEventParams>()
126122
.And.Subject
127-
.Should().BeEquivalentTo(@event, z=> z.UsingStructuralRecordEquality().Excluding(x => x.ExtensionData));
123+
.Should().BeEquivalentTo(@event, z => z.UsingStructuralRecordEquality().Excluding(x => x.ExtensionData));
128124
}
129125

130126
[RetryFact]
@@ -141,8 +137,7 @@ public async Task Should_Support_Custom_Telemetry_Receiving_Regular_Telemetry_Us
141137
PromptToUpdatePackageManagement = false
142138
};
143139
server.SendTelemetryEvent(@event);
144-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
145-
await SettleNext();
140+
await SettleNext();
146141

147142
var call = fake.ReceivedCalls().Single();
148143
var args = call.GetArguments();
@@ -171,8 +166,7 @@ public async Task Should_Support_Custom_Telemetry_Using_Extension_Data_Using_Del
171166
}
172167
}
173168
);
174-
while (!fake.ReceivedCalls().Any() && !CancellationToken.IsCancellationRequested)
175-
await SettleNext();
169+
await SettleNext();
176170

177171
var call = fake.ReceivedCalls().Single();
178172
var args = call.GetArguments();

test/Lsp.Tests/Integration/LanguageServerConfigurationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public async Task Should_Support_Options_Monitor()
254254
// IOptionsMonitor<> is registered as a singleton, so this will update
255255
options.CurrentValue.Host.Should().Be("localhost");
256256
options.CurrentValue.Port.Should().Be(443);
257-
sub.Received(Quantity.AtLeastOne()).Invoke(Arg.Any<BinderSourceUrl>());
257+
sub.Received(1).Invoke(Arg.Any<BinderSourceUrl>());
258258

259259
configuration.Update("mysection", new Dictionary<string, string> { ["host"] = "127.0.0.1", ["port"] = "80" });
260260
await options.WaitForChange(CancellationToken);

test/TestingUtils/AutoNSubstitute/TestExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public static JsonRpcTestOptions ConfigureForXUnit(
1919
jsonRpcTestOptions
2020
.WithClientLoggerFactory(new TestLoggerFactory(outputHelper, "{Timestamp:yyyy-MM-dd HH:mm:ss} [Client] [{Level}] {Message}{NewLine}{Exception}", logEventLevel))
2121
.WithServerLoggerFactory(new TestLoggerFactory(outputHelper, "{Timestamp:yyyy-MM-dd HH:mm:ss} [Server] [{Level}] {Message}{NewLine}{Exception}", logEventLevel))
22-
.WithClientScheduler(Scheduler.CurrentThread)
23-
.WithServerScheduler(Scheduler.CurrentThread)
2422
;
2523
}
2624
}

test/TestingUtils/ModuleInitializerAttribute.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/TestingUtils/XUnitPlatformEnlightenmentProvider.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)