Skip to content

Commit e2df351

Browse files
committed
Fix coverage.
1 parent 3522921 commit e2df351

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

PSql.Deploy.Engine.Tests/Core/DeploymentSessionTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,14 @@ static void AssertParallelism(Target t, TargetParallelism p)
181181
[Test]
182182
public async Task Apply_Any_Cancellation()
183183
{
184-
ExpectApplyCore(TargetA, (t, p) => Session.Cancel()); // cancels session
185-
//pectApplyCore(TargetB); // never happens
184+
void SimulateCancellation(Target t, TargetParallelism p)
185+
{
186+
Session.Cancel();
187+
Session.CancellationToken.ThrowIfCancellationRequested();
188+
}
189+
190+
ExpectApplyCore(TargetA, SimulateCancellation); // cancels session
191+
//pectApplyCore(TargetB); // never happens
186192

187193
Session.BeginApplying(TargetA, maxParallelism: 1);
188194
await WaitForSessionCancellationAsync(); // because count of errors exceeded max (default 0)

0 commit comments

Comments
 (0)