Skip to content

Native tests fail when using @SpringBootTest with RANDOM_PORT or DEFINED_PORT #32542

Closed
@rajadilipkolli

Description

@rajadilipkolli

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions