Using unique port for standalone tests

This commit is contained in:
Marcin Grzejszczak
2018-01-19 01:20:34 +01:00
parent f486eeb85b
commit ca51769f98
3 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ public class LoanApplicationService {
private final RestTemplate restTemplate;
private int port = 6565;
private int port = 6569;
@Autowired
public LoanApplicationService(RestTemplateBuilder builder) {

View File

@@ -18,7 +18,7 @@ import com.example.loan.model.LoanApplicationStatus;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.NONE, properties="server.context-path=/app")
@AutoConfigureStubRunner(ids = {"com.example:http-server-yml:+:stubs:6565"}, workOffline = true)
@AutoConfigureStubRunner(ids = {"com.example:http-server-yml:+:stubs:6569"}, workOffline = true)
@DirtiesContext
public class LoanApplicationServiceContextPathTests {

View File

@@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat;
// tag::autoconfigure_stubrunner[]
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.NONE)
@AutoConfigureStubRunner(ids = {"com.example:http-server-yml:+:stubs:6565"}, workOffline = true)
@AutoConfigureStubRunner(ids = {"com.example:http-server-yml:+:stubs:6569"}, workOffline = true)
@DirtiesContext
public class LoanApplicationServiceTests {
// end::autoconfigure_stubrunner[]