-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce correct AsyncContext use and name "thread" (#1662)
`TestExecutor` can improve the testing of the code under test by requiring that tasks it runs correctly handle saving and restoring of the `AsyncContext`. It would also be useful to set the thread name so that it can be captured by the tasks and to make the execution context clear for logging or debugging. Modifications: Before any task is run the active (if any) `AsyncContext` is saved and a special hostile instance is substituted that detects improper access. The name of the executing thread is also adjusted while running the task to identify the `TestExecutor` instance. Result: Additional testing capability for `TestExecutor` users.
- Loading branch information
Showing
1 changed file
with
102 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9526877
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.41 (9526877)