Merge pull request #12811 from eugenp/openapi-wiremock-error
change port to avoid conflict
This commit is contained in:
commit
bedbeb1432
|
@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
@FeignClient(name = "product-client", url = "http://localhost:8081/product/", configuration = FeignConfig.class)
|
@FeignClient(name = "product-client", url = "http://localhost:8084/product/", configuration = FeignConfig.class)
|
||||||
public interface ProductClient {
|
public interface ProductClient {
|
||||||
|
|
||||||
@RequestMapping(value = "{id}", method = RequestMethod.GET)
|
@RequestMapping(value = "{id}", method = RequestMethod.GET)
|
||||||
|
|
|
@ -27,9 +27,10 @@ public class ProductClientUnitTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void startWireMockServer() {
|
public void startWireMockServer() {
|
||||||
wireMockServer = new WireMockServer(8081);
|
wireMockServer = new WireMockServer(8084);
|
||||||
configureFor("localhost", 8081);
|
configureFor("localhost", 8084);
|
||||||
wireMockServer.start();
|
wireMockServer.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
@ -20,7 +20,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.*;
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@WebMvcTest(ProductController.class)
|
@WebMvcTest(ProductController.class)
|
||||||
@ImportAutoConfiguration({FeignAutoConfiguration.class, TestControllerAdvice.class})
|
@ImportAutoConfiguration({FeignAutoConfiguration.class, TestControllerAdvice.class})
|
||||||
|
@ -37,8 +36,8 @@ public class ProductControllerUnitTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void startWireMockServer() {
|
public void startWireMockServer() {
|
||||||
wireMockServer = new WireMockServer(8081);
|
wireMockServer = new WireMockServer(8084);
|
||||||
configureFor("localhost", 8081);
|
configureFor("localhost", 8084);
|
||||||
wireMockServer.start();
|
wireMockServer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue