Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonTest isn't annotated with @ExtendWith(SpringExtension.class) #16183

Closed
jnizet opened this issue Mar 9, 2019 · 3 comments
Closed

JsonTest isn't annotated with @ExtendWith(SpringExtension.class) #16183

jnizet opened this issue Mar 9, 2019 · 3 comments
Labels
type: bug A general bug
Milestone

Comments

@jnizet
Copy link
Contributor

jnizet commented Mar 9, 2019

Spring Boot 2.1.3.RELEASE: unlike other XxxTest annotations, JsonTest isn't annotated with @ExtendWith(SpringExtension.class), and I haven't seen any indication in the documentation or the developer guide that it shouldn't be.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 9, 2019
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 9, 2019
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 9, 2019
@wilkinsona
Copy link
Member

Looks like I missed this when I added @ExtendWith(SpringExtension.class) to all the @…Test annotations. Thanks for spotting and reporting it.

@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.1.4 Mar 9, 2019
@hayworks
Copy link

hayworks commented Oct 16, 2020

I am using spring boot 2.2.6 and. it. still gives me the error:

Suppressed: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

Is it certain for @JsonTest that it is fixed?

@snicoll
Copy link
Member

snicoll commented Oct 16, 2020

@hayworks that exception is a confirmation that the extension has been applied. A suitable @SpringBootConfiguration (i.e. @SpringBootApplication) was not found in the hierarchy and therefore the test context can't start properly. Please refer to the reference documentation and follow-up on StackOverflow if you have more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants