//Hack to work around https://github.com/spring-cloud/spring-cloud-commons/issues/156
+ static {
+ System.setProperty("eureka.client.enabled", "false");
+ System.setProperty("spring.cloud.config.failFast", "false");
+ }
+diff --git a/1.0.x/spring-cloud-contract.html b/1.0.x/spring-cloud-contract.html index a69e7dc08a..acf5183381 100644 --- a/1.0.x/spring-cloud-contract.html +++ b/1.0.x/spring-cloud-contract.html @@ -660,7 +660,11 @@ $(addBlockSwitches);
Stub Runner can integrate with Spring Cloud.
For real life examples you can check the
+In your integration tests you typically don’t want to call neither a discovery service (e.g. Eureka) +or Config Server. That’s why you create an additional test configuration in which you want to disable +these features.
+Due to certain limitations of spring-cloud-commons to achieve this you have disable these properties
+via a static block like presented below (example for Eureka)
//Hack to work around https://github.com/spring-cloud/spring-cloud-commons/issues/156
+ static {
+ System.setProperty("eureka.client.enabled", "false");
+ System.setProperty("spring.cloud.config.failFast", "false");
+ }
+