Title: 馃悶: allure-spock2 tests uuid conflicts during parallel tests execution 路 Issue #1203 路 allure-framework/allure-java 路 GitHub
Open Graph Title: 馃悶: allure-spock2 tests uuid conflicts during parallel tests execution 路 Issue #1203 路 allure-framework/allure-java
X Title: 馃悶: allure-spock2 tests uuid conflicts during parallel tests execution 路 Issue #1203 路 allure-framework/allure-java
Description: What happened? There is an issue with allure-results reporting during parallel tests execution using Spock framework: // File SpockConfig.groovy runner { parallel { enabled true dynamicWithReservedProcessors(1.0, 0) } } I am not 100% sur...
Open Graph Description: What happened? There is an issue with allure-results reporting during parallel tests execution using Spock framework: // File SpockConfig.groovy runner { parallel { enabled true dynamicWithReserved...
X Description: What happened? There is an issue with allure-results reporting during parallel tests execution using Spock framework: // File SpockConfig.groovy runner { parallel { enabled true dynamicWithReserved...
Opengraph URL: https://github.com/allure-framework/allure-java/issues/1203
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"馃悶: allure-spock2 tests uuid conflicts during parallel tests execution","articleBody":"### What happened?\n\nThere is an issue with allure-results reporting during parallel tests execution using Spock framework:\n```groovy\n// File SpockConfig.groovy\nrunner {\n parallel {\n enabled true\n dynamicWithReservedProcessors(1.0, 0)\n }\n}\n```\n\nI am not 100% sure how to reproduce the issue, but with a large number of tests and with run in parallel, there is an issue, when allure-spock2 extension `AllureSpock2` reuses `ThreadLocal\u003cString\u003e testResults` with already defined initial UUID. It leads to the tests being registered with a non-unique UUID.\nThe symptoms are:\n```log\n2025-10-15 14:17:09,189 [ERROR] [ForkJoinPool-1-worker-9] [] - io.qameta.allure.AllureLifecycle.updateTestCase - Could not update test case: test case with uuid 4a4716fb-ada4-40ab-91a7-9fd615c19401 not found\n2025-10-15 14:17:09,189 [ERROR] [ForkJoinPool-1-worker-9] [] - io.qameta.allure.AllureLifecycle.stopTestCase - Could not stop test case: test case with uuid 4a4716fb-ada4-40ab-91a7-9fd615c19401 not found\n2025-10-15 14:17:09,189 [ERROR] [ForkJoinPool-1-worker-9] [] - io.qameta.allure.AllureLifecycle.writeTestCase - Could not write test case: test case with uuid 4a4716fb-ada4-40ab-91a7-9fd615c19401 not found\n```\nAnd there are fewer tests in the Allure report than were actually run.\n\nI've prepared the fix, but I do not have permissions to push into the repo.\n\nPlease, take a look at the fix below, and if you find it suitable - apply the fix.\n\n```java\n// allure-spock2/src/main/java/io/qameta/allure/spock2/AllureSpock2.java \n// instead of\nprivate final ThreadLocal\u003cString\u003e testResults = new InheritableThreadLocal\u003cString\u003e() {\n @Override\n protected String initialValue() {\n return UUID.randomUUID().toString();\n }\n};\n// use\nprivate final ThreadLocal\u003cString\u003e testResults = new ThreadLocal\u003c\u003e();\n\n// in beforeIteration\n@Override\npublic void beforeIteration(final IterationInfo iteration) {\n final String uuid = UUID.randomUUID().toString();\n testResults.set(uuid);\n // ...\n}\n\n// in afterIteration\n@Override\npublic void afterIteration(final IterationInfo iteration) {\n final String uuid = testResults.get();\n\n if (uuid == null) {\n return;\n }\n\n try {\n getLifecycle().updateTestCase(uuid, testResult -\u003e {\n if (Objects.isNull(testResult.getStatus())) {\n testResult.setStatus(Status.PASSED);\n }\n });\n getLifecycle().stopTestCase(uuid);\n getLifecycle().writeTestCase(uuid);\n } finally {\n testResults.remove();\n }\n}\n\n```\n\n### What Allure Integration are you using?\n\nallure-spock2\n\n### What version of Allure Integration you are using?\n\n2.30.0\n\n### What version of Allure Report you are using?\n\n2.12.0\n\n### Code of Conduct\n\n- [x] I agree to follow this project's Code of Conduct","author":{"url":"https://github.com/n1kolass","@type":"Person","name":"n1kolass"},"datePublished":"2025-10-15T16:39:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1203/allure-java/issues/1203"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e1b8e545-fc4f-5c6f-5f9a-773e4b39b2bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDAA:211079:FE551D:15988DE:696E9793 |
| html-safe-nonce | 3203372e0e9512f3684ad1ea603d63f42658c221cf46f7be8d20d512f8e174fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREFBOjIxMTA3OTpGRTU1MUQ6MTU5ODhERTo2OTZFOTc5MyIsInZpc2l0b3JfaWQiOiIyODc5ODYyNDU2NjMwMjg2MjI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 878411a4e4a5f486261c30ddb10f3e313ab5d36d2bf72fd1e4c5ce17efb753c0 |
| hovercard-subject-tag | issue:3518810822 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/allure-framework/allure-java/1203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f814ce125c520ad13005e5923cc262b347bbd8d8447bf6c876c0eed7483876bb/allure-framework/allure-java/issues/1203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f814ce125c520ad13005e5923cc262b347bbd8d8447bf6c876c0eed7483876bb/allure-framework/allure-java/issues/1203 |
| og:image:alt | What happened? There is an issue with allure-results reporting during parallel tests execution using Spock framework: // File SpockConfig.groovy runner { parallel { enabled true dynamicWithReserved... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | n1kolass |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-preview |
| go-import | github.com/allure-framework/allure-java git https://github.com/allure-framework/allure-java.git |
| octolytics-dimension-user_id | 5879127 |
| octolytics-dimension-user_login | allure-framework |
| octolytics-dimension-repository_id | 80822758 |
| octolytics-dimension-repository_nwo | allure-framework/allure-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 80822758 |
| octolytics-dimension-repository_network_root_nwo | allure-framework/allure-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width