recently I changed my spring boot properties to define a management port. In doing so, my unit tests started to fail :(
I wrote a unit test that tested the /
For Spring boot test we need to specify the port it needs to connect to.
By default, it connects to server.port which in case of actuators is different.
This can be done by
@SpringBootTest(properties = "server.port=8090")
in application.properties we specify the management port as below
...
management.port=8090
...