Hi,
I have an integration test passing with Spring Boot (3.1.6) but when I use the latest version 3.2.4, it is failing with below error
Assertion error: Status expected:<404 NOT_FOUND> but was:<500 INTERNAL_SERVER_ERROR>
Sharing sample code below
@ExtendWith(SpringExtension.class)
@SpringBootTest
@EnableDevelopmentSecurityValidator
@AutoConfigureMockMvc
public class TestControllerIT{
private WebTestClient testClient;
public void getTestDetails(){
testClient.get()
.uri(uriBuilder -> uriBuilder.path("/getUsers")
.queryParam ("id", 123)
.build())
.headers(xxx)
.exchange()
.expectStatus ()
.isNotFound();
}
}
TestController.java
@RestController
@Validated
public class TestController{
@GetMapping(value="getEmployees")
Public Mono<Response entity<List<Employees>>> getEmployees(){
}
}
Can someone please check this issue and provide the fix for this issue?
Thanks, Lakshmi
Comment From: mhalbritter
If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.
Comment From: lakshmipasupuleti
Sorry I can't share the code, if you could check above sample code and provide any solution it would be helpful.
Comment From: mhalbritter
Unfortunately it's not possible to tell from the code above what's wrong. It could be the changes in validation in Spring Framework, e.g. something like this: https://github.com/spring-projects/spring-boot/issues/40055
But without code, we can't really tell.
We don't need the original code, just one example which passes with Boot 3.1 and fails with Boot 3.2.
Comment From: lakshmipasupuleti
We haven't made any code changes, just updated spring boot from 3.1.x to 3.2.4
Comment From: bclozel
Moritz already linked to related issues. If you're not willing to share a sample application we cannot justify spending the time trying to reproduce a behavior we have not seen. Very often code snippets are not enough and crucial information can be in other parts of the application.
We can reopen this issue once the requested sample is provided.
Comment From: lakshmipasupuleti
Thanks for looking into it, I am able to resolve the issue with the help of the steps mentioned in below link https://github.com/spring-projects/spring-boot/issues/38733 Hope it will be helpful for others who are facing this issue