Document Spring Boot 4 and JUnit 6 compatibility for Spock Spring module#2308
Document Spring Boot 4 and JUnit 6 compatibility for Spock Spring module#2308NikStack20 wants to merge 2 commits intospockframework:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a documentation subsection "JUnit Platform Extension Compatibility" clarifying that Spock runs on the JUnit Platform but does not automatically execute arbitrary JUnit Jupiter extensions; documents compatibility concerns (e.g., Spring Boot 4) and a workaround: add Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a valuable documentation section clarifying Spring Boot 4 and JUnit 6 extension compatibility with Spock. The documentation explains that pure JUnit 6 extensions (like
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 20c8309 |
docs/module_spring.adoc
Outdated
| ---- | ||
|
|
||
| This bridges the JUnit 6 extension lifecycle into Spock | ||
| and restores expected behavior when using such extensions. No newline at end of file |
There was a problem hiding this comment.
Missing newline at end of file
| and restores expected behavior when using such extensions. | |
| and restores expected behavior when using such extensions. | |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/module_spring.adoc`:
- Around line 135-153: The doc incorrectly labels `@EnableWireMock` and
`@InjectWireMock` as JUnit 6 extensions; update the "Spring Boot 4 and JUnit 6
Compatibility" section to either remove the recommendation to add
ru.vyarus:spock-junit6 for wiremock-spring-boot, or clarify that
ru.vyarus:spock-junit6 only bridges JUnit Jupiter Extension API (e.g.,
`@ExtendWith`, `@RegisterExtension`) into Spock and is not required for Spring test
annotations like `@EnableWireMock` / `@InjectWireMock` which are handled by Spring's
test framework (and should work with `@SpringBootTest`); verify and state the
specific scenarios where spock-junit6 is actually necessary and adjust the
example dependency suggestion accordingly.
|
I'm sorry, but I don't think this PR should be merged like this. It mixes terms up that should not be mixed up and also wrongly uses "expected integration behavior", because if you expect a Jupiter extension to work within Spock, then the expectation is wrong, not the behavior. :-) Some points:
I happen to also have added some words about this topic in this PR which would imho supersede this PR: #2322 |
|
Thanks for the detailed explanation and for pointing out the terminology issues. You're right that my wording around "JUnit Platform Extension" and the expectation about Jupiter extensions working within Spock was misleading. I appreciate the clarification regarding the relationship between the JUnit Platform, the Jupiter engine, and the Spock engine. I'll take a look at PR #2322 to understand how this topic is addressed there. If that PR already covers the documentation gap appropriately, I'm happy to close this PR to avoid duplication. Thanks again for the feedback. |
Reproduced Spring Boot 4 behavior where pure JUnit 6 extensions
(e.g. @EnableWireMock) are not automatically executed in Spock.
Confirmed that adding ru.vyarus:spock-junit6 restores expected behavior.
This PR adds a documentation clarification in the Spring module guide.
Summary by CodeRabbit