Skip to content

Commit

Permalink
Use CTS from testContext to detect cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Dec 19, 2024
1 parent 4c74a53 commit e906ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ internal void ExecuteAssemblyCleanup(TestContext testContext)
AssemblyCleanupMethod.InvokeAsSynchronousTask(null, testContext);
}
},
new CancellationTokenSource(),
testContext.CancellationTokenSource,
AssemblyCleanupMethodTimeoutMilliseconds,
AssemblyCleanupMethod,
new AssemblyExecutionContextScope(isCleanup: true),
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ void DoRun()
methodInfo.InvokeAsSynchronousTask(null, testContext);
}
},
new CancellationTokenSource(),
testContext.CancellationTokenSource,
timeout,
methodInfo,
new ClassExecutionContextScope(ClassType, remainingCleanupCount),
Expand Down

0 comments on commit e906ec5

Please sign in to comment.