I do the migration from a Spring Boot reactive to mvc. I migrated controllers and now I try to migrate integration tests.
Controller's tests are annotated like this and if I run test it works.
@RunWith(SpringRunner.class)
@WebFluxTest
public class MyIntegrationTest {
}
Then I replace WebFluxTest
annotation like this
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureWebTestClient
public class MyIntegrationTest {
}
If I run this test I have reactor.core.Exceptions$ReactiveException: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:8080
. Any ideas how to fix it?