test: pass TestContext.Current.CancellationToken at xUnit1051 call sites (analyzer code fix, 451 sites) (lmxopcua#725)
Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -55,7 +55,7 @@ public class SubscribeCommandSummaryTests
|
||||
};
|
||||
|
||||
using var console = TestConsoleHelper.CreateConsole();
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console));
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console), TestContext.Current.CancellationToken);
|
||||
|
||||
// Wait until the subscription is registered by the fake.
|
||||
await WaitForAsync(() => fakeService.SubscribeCalls.Count == 1);
|
||||
@@ -86,7 +86,7 @@ public class SubscribeCommandSummaryTests
|
||||
};
|
||||
|
||||
using var console = TestConsoleHelper.CreateConsole();
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console));
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console), TestContext.Current.CancellationToken);
|
||||
|
||||
await WaitForAsync(() => fakeService.SubscribeCalls.Count == 1);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class SubscribeCommandSummaryTests
|
||||
};
|
||||
|
||||
using var console = TestConsoleHelper.CreateConsole();
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console));
|
||||
var runTask = Task.Run(async () => await command.ExecuteAsync(console), TestContext.Current.CancellationToken);
|
||||
|
||||
await WaitForAsync(() => fakeService.SubscribeCalls.Count == 1);
|
||||
fakeService.RaiseDataChanged(
|
||||
@@ -180,7 +180,7 @@ public class SubscribeCommandSummaryTests
|
||||
await command.ExecuteAsync(console);
|
||||
|
||||
File.Exists(tempFile).ShouldBeTrue();
|
||||
var contents = await File.ReadAllTextAsync(tempFile);
|
||||
var contents = await File.ReadAllTextAsync(tempFile, TestContext.Current.CancellationToken);
|
||||
contents.ShouldContain("SUMMARY");
|
||||
contents.ShouldContain("Total subscribed: 1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user