Skip to content

Support for CancellationTokenSource in TestContext to help in timeout…#585

Merged
cltshivash merged 4 commits into
microsoft:masterfrom
cltshivash:master
Mar 28, 2019
Merged

Support for CancellationTokenSource in TestContext to help in timeout…#585
cltshivash merged 4 commits into
microsoft:masterfrom
cltshivash:master

Conversation

@cltshivash

Copy link
Copy Markdown
Contributor

Support for CancellationTokenSource in TestContext to help in timeout scenario

@cltshivash cltshivash requested a review from jayaranigarg March 16, 2019 15:56
@acesiddhu

Copy link
Copy Markdown
Contributor

do we have a RFC for this change?

@cltshivash

Copy link
Copy Markdown
Contributor Author

do we have a RFC for this change?

Yes will author one.

Comment thread src/TestFramework/Extension.Shared/TestContext.cs Outdated
Comment thread src/Adapter/MSTest.CoreAdapter/Execution/TestMethodInfo.cs
Comment thread src/Adapter/MSTest.CoreAdapter/Execution/TestMethodInfo.cs Outdated
Comment thread src/Adapter/PlatformServices.Desktop/Services/DesktopThreadOperations.cs Outdated
Comment thread src/TestFramework/Extension.Shared/TestContext.cs Outdated
@jayaranigarg

Copy link
Copy Markdown
Member

I would encourage you to add E2E test for the scenario which shows how can user leverage this CancellationToken.

@cltshivash

Copy link
Copy Markdown
Contributor Author

I would encourage you to add E2E test for the scenario which shows how can user leverage this CancellationToken.

Added E2E tests

<data name="UTA_TestMethodExpectedParameters" xml:space="preserve">
<value>Only data driven test methods can have parameters. Did you intend to use [DataRow] or [DynamicData]?</value>
</data>
<data name="Execution_Test_Cancelled" xml:space="preserve">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please xlf file changes associated with this change

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run command "build.cmd -uxlf". You would have to commit the xlf files changes post running the script.

namespace TimeoutTestProject
{
[TestClass]
public class TerimnateLongRunningTasksUsingTokenTestClass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TerimnateLongRunningTasksUsingTokenTestClass [](start = 17, length = 44)

Nit: Terminate

@cltshivash cltshivash merged commit 1990568 into microsoft:master Mar 28, 2019
@singhsarab

Copy link
Copy Markdown
Contributor

@cltshivash Can you please add an RFC for this. If added already, please add the link here. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants