test(historian): pass TestContext.Current.CancellationToken in the batched alarm-writer test (lmxopcua#746)
The batched-alarm-history test came from the lane-H2 branch, which predates the xUnit1051 sweep on master (lmxopcua#725). Two no-token calls broke the Release build under TreatWarningsAsErrors after the rebase. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
+2
-2
@@ -101,10 +101,10 @@ public sealed class AlarmWriterTests(SqlHistorianFixture fx)
|
|||||||
r.Count.ShouldBe(401);
|
r.Count.ShouldBe(401);
|
||||||
r.ShouldAllBe(o => o == HistorianWriteOutcome.Ack);
|
r.ShouldAllBe(o => o == HistorianWriteOutcome.Ack);
|
||||||
await using var c = new SqlConnection(fx.ConnectionString);
|
await using var c = new SqlConnection(fx.ConnectionString);
|
||||||
await c.OpenAsync();
|
await c.OpenAsync(TestContext.Current.CancellationToken);
|
||||||
await using var cmd = c.CreateCommand();
|
await using var cmd = c.CreateCommand();
|
||||||
cmd.CommandText = $"SELECT COUNT(*) FROM [{s}].Event";
|
cmd.CommandText = $"SELECT COUNT(*) FROM [{s}].Event";
|
||||||
Convert.ToInt32(await cmd.ExecuteScalarAsync()).ShouldBe(400);
|
Convert.ToInt32(await cmd.ExecuteScalarAsync(TestContext.Current.CancellationToken)).ShouldBe(400);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
Reference in New Issue
Block a user