You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading the project to spring boot 3.0.0-M5 and running native tests it is failing with below error. Expectation that it should work without any configuration
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer$TestRestTemplateRegistrar': Runtime reflection is not supported for org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer$TestRestTemplateRegistrar()
wilkinsona
changed the title
Spring Native Tests failing when @AutoConfigureMockMvc is present
Native tests fail when @AutoConfigureMockMvc is present
Sep 29, 2022
wilkinsona
changed the title
Native tests fail when @AutoConfigureMockMvc is present
Native tests fail when using @SpringBootTest with RANDOM_PORT or DEFINED_PORT
Sep 29, 2022
Thanks, @rajadilipkolli. The problem appears to be due to @SpringBootTest with a non-mock web environment. As you're using MockMvc anyway, you could avoid the problem for now by using @SpringBootTest rather than @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT).
After upgrading the project to spring boot 3.0.0-M5 and running native tests it is failing with below error. Expectation that it should work without any configuration
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer$TestRestTemplateRegistrar': Runtime reflection is not supported for org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer$TestRestTemplateRegistrar()
For more info about error logs
Sample to reproduce the issue
The text was updated successfully, but these errors were encountered: