Investigate troubles caused by Spock integration
See original GitHub issueReported here https://github.com/junit-team/junit5/commit/eaab286a53d534966de7cf6200955c0d3b8830f4. I need to check in more depth but perhaps one nice idea would be to have the support not dependant on the JfrEventTest
annotation (global spock extension). If I understand that correctly Quarkus support works like that. It would make usage even simpler.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Spock Framework Reference Documentation
Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful...
Read more >Chapter 1. Introducing the Spock testing framework
Introducing Spock; Bird's-eye view of the testing process; Using Groovy to test Java; Understanding Spock's place in the testing world;
Read more >Grails 3.0.0: Problem using @Rollback with integration tests ...
I expect the Rollback annotation is causing the problem because there isn't a transaction running in the integration test space. Is Rollback the ......
Read more >Grails spock tests with private methods failing after upgrading ...
All are working fine, but some test cases are failing which containing some private methods. import org.junit.Before class UserServiceSpec ...
Read more >Speed Up Spock Spring Tests - Object Partners
Spock tests for Spring applications can be slow and hard to maintain. ... Disadvantages: Dangerous – almost guaranteed to cause problems ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gunnarmorling, I think you misunderstood the point I was trying to make (likely because I was too vague).
Yes, that’s a great feature of Java. No doubt. We love it!
But… the Java compiler emits a warning if you try to use a third-party annotation in your own code when that third-party annotation is meta-annotated with a second third-party annotation that is not present in the class path.
And… if you compile with
-Werror
(which many projects do), your build fails.We argued with the Java team that such a condition should not result in a warning that can fail the build, because of the fact that the exact same code (once compiled) works fine at runtime without the second third-party annotation on the classpath.
Does that make sense now?
Hmmm… maybe I should say fourth-party instead of “second third-party”. 🤔
Ah yes, got it now. Indeed I understood exactly the opposite of what you meant to say 😃 So yes, I agree there should be a way for compiling the code of this situation without any warnings (and without supressing other, unrelated, warnings), if that code can be run just fine later on.