Skip to content

Update cancelafter.md to clarify cancellation token usage#1144

Merged
SeanKilleen merged 3 commits intomasterfrom
stevenaw-patch-1
Mar 3, 2026
Merged

Update cancelafter.md to clarify cancellation token usage#1144
SeanKilleen merged 3 commits intomasterfrom
stevenaw-patch-1

Conversation

@stevenaw
Copy link
Member

@stevenaw stevenaw commented Mar 2, 2026

Clarify that the cancellation token is available across all execution phases.

Clarify that the cancellation token is available across all execution phases.
@manfred-brands
Copy link
Member

Note that if the test is cancelled it cannot be used in the teardown.
So maybe we should add that it shouldn't be used in a teardown method.

@stevenaw
Copy link
Member Author

stevenaw commented Mar 2, 2026

Thanks! I can add that too

Clarify the behavior of cancellation tokens in TearDown phases and their implications for cleanup methods.
@stevenaw
Copy link
Member Author

stevenaw commented Mar 2, 2026

I think I've captured the behaviour and your recommendations here @manfred-brands . Can you let me know what you think?

Copy link
Member

@manfred-brands manfred-brands left a comment

Choose a reason for hiding this comment

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

Thanks @stevenaw. Looks good.

Copy link
Member

@OsirisTerje OsirisTerje left a comment

Choose a reason for hiding this comment

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

lgtm

@SeanKilleen SeanKilleen merged commit e74521d into master Mar 3, 2026
7 checks passed
@SeanKilleen SeanKilleen deleted the stevenaw-patch-1 branch March 3, 2026 20:50
github-actions bot pushed a commit that referenced this pull request Mar 3, 2026
* Update cancelafter.md to clarify cancellation token usage

Clarify that the cancellation token is available across all execution phases.

* Enhance documentation on cancellation token usage

Clarify the behavior of cancellation tokens in TearDown phases and their implications for cleanup methods.

* Apply suggestion from @stevenaw e74521d
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