Title: fix: step tree incorrect when spawn thread nestly #872 by SalHe · Pull Request #874 · allure-framework/allure-python · GitHub
Open Graph Title: fix: step tree incorrect when spawn thread nestly #872 by SalHe · Pull Request #874 · allure-framework/allure-python
X Title: fix: step tree incorrect when spawn thread nestly #872 by SalHe · Pull Request #874 · allure-framework/allure-python
Description: Context Fix #872: Providing an approach to fix incorrect step tree when testing multithread(and spawned nested threads). In this approach, it's needed to explictly initialize thread for allure in new spawned thread(to propagate parent thread's state into new spawned child thread ---- any other elegant way? I have googled but not found.) Example adjusting example in #872: from concurrent.futures import ThreadPoolExecutor import allure def session_on_node(node_id, session): with allure.step(f"Session#{session} on Node#{node_id}"): pass def parallel_task_for_specific_node(node_id): with allure.step(f"Node#{node_id}") as step: with ThreadPoolExecutor(initializer=step.get_thread_initializer()) as executor: for session in range(3): executor.submit(session_on_node, node_id, session) executor.shutdown(wait=True) def test_multithreaded(): with allure.step("Root") as step: with ThreadPoolExecutor(initializer=step.get_thread_initializer()) as executor: for node_id in range(3): executor.submit(parallel_task_for_specific_node, node_id) executor.shutdown(wait=True) we could get report with expected step tree: Checklist Sign Allure CLA Provide unit tests
Open Graph Description: Context Fix #872: Providing an approach to fix incorrect step tree when testing multithread(and spawned nested threads). In this approach, it's needed to explictly initialize thread for allure...
X Description: Context Fix #872: Providing an approach to fix incorrect step tree when testing multithread(and spawned nested threads). In this approach, it's needed to explictly initialize thread for al...
Opengraph URL: https://github.com/allure-framework/allure-python/pull/874
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5de00118-d81f-2f5f-4506-b0ba395b47b7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9ADA:945DC:10254C4:15C9E08:696E9B24 |
| html-safe-nonce | 37b06bb9569792c31e9fee122facb85b6b5af61a6b0757c848be8ead7ee658fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QURBOjk0NURDOjEwMjU0QzQ6MTVDOUUwODo2OTZFOUIyNCIsInZpc2l0b3JfaWQiOiI0MzE4NzU2NDIxNTQxNzMxMTA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 948558cb6d1dd689b631e0e56e892ed19c164a52a9a23a031d7c8bc6b8f431e5 |
| hovercard-subject-tag | pull_request:2732906150 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/allure-framework/allure-python/pull/874/files |
| twitter:image | https://avatars.githubusercontent.com/u/8342541?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8342541?s=400&v=4 |
| og:image:alt | Context Fix #872: Providing an approach to fix incorrect step tree when testing multithread(and spawned nested threads). In this approach, it's needed to explictly initialize thread for allure... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/allure-framework/allure-python git https://github.com/allure-framework/allure-python.git |
| octolytics-dimension-user_id | 5879127 |
| octolytics-dimension-user_login | allure-framework |
| octolytics-dimension-repository_id | 79346720 |
| octolytics-dimension-repository_nwo | allure-framework/allure-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 79346720 |
| octolytics-dimension-repository_network_root_nwo | allure-framework/allure-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width