From d9fe4ac307cb3eca2a5af229a71f0ea50b8f01d1 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 1 Sep 2017 14:38:51 +0200 Subject: [PATCH] Adding note in the docs about Stubrunner and messaging; fixes #407 --- docs/src/main/asciidoc/verifier_stubrunner_msg.adoc | 5 +++++ tests/spring-cloud-contract-stub-runner-amqp/README.adoc | 4 ++++ tests/spring-cloud-contract-stub-runner-camel/README.adoc | 4 ++++ .../README.adoc | 4 ++++ tests/spring-cloud-contract-stub-runner-stream/README.adoc | 4 ++++ 5 files changed, 21 insertions(+) diff --git a/docs/src/main/asciidoc/verifier_stubrunner_msg.adoc b/docs/src/main/asciidoc/verifier_stubrunner_msg.adoc index eb664a6ca1..0b001238ee 100644 --- a/docs/src/main/asciidoc/verifier_stubrunner_msg.adoc +++ b/docs/src/main/asciidoc/verifier_stubrunner_msg.adoc @@ -9,6 +9,11 @@ Stub Runner has the functionality to run the published stubs in memory. It can i It also provides points of entry to integrate with any other solution on the market. +IMPORTANT: If you have multiple frameworks on the classpath Stub Runner will need to +define which one should be used. Let's assume that you have both AMQP, Spring Cloud Stream and Spring Integration +on the classpath. Then you need to set `stubrunner.stream.enabled=false` and `stubrunner.integration.enabled=false`. +That way the only remaining framework is Spring AMQP. + === Stub triggering To trigger a message it's enough to use the `StubTrigger` interface: diff --git a/tests/spring-cloud-contract-stub-runner-amqp/README.adoc b/tests/spring-cloud-contract-stub-runner-amqp/README.adoc index 6023a6cf17..40476c4c0d 100644 --- a/tests/spring-cloud-contract-stub-runner-amqp/README.adoc +++ b/tests/spring-cloud-contract-stub-runner-amqp/README.adoc @@ -21,6 +21,10 @@ The message is triggered to all matching message listeners. It's enough to have both Spring AMQP and Spring Cloud Contract Stub Runner on the classpath and set the property `stubrunner.amqp.enabled=true`. Remember to annotate your test class with `@AutoConfigureStubRunner`. +IMPORTANT: If you already have Stream and Integration on the classpath you need +to disable them explicitly via `stubrunner.stream.enabled=false` and `stubrunner.integration.enabled=false` +properties + ==== Examples ===== Stubs structure diff --git a/tests/spring-cloud-contract-stub-runner-camel/README.adoc b/tests/spring-cloud-contract-stub-runner-camel/README.adoc index e9ca159a08..30c50c8e55 100644 --- a/tests/spring-cloud-contract-stub-runner-camel/README.adoc +++ b/tests/spring-cloud-contract-stub-runner-camel/README.adoc @@ -12,6 +12,10 @@ routes. It's enough to have both Apache Camel and Spring Cloud Contract Stub Runner on classpath. Remember to annotate your test class with `@AutoConfigureStubRunner`. +==== Disabling the functionality + +If you need to disable this functionality just pass `stubrunner.camel.enabled=false` property. + ==== Examples ===== Stubs structure diff --git a/tests/spring-cloud-contract-stub-runner-integration/README.adoc b/tests/spring-cloud-contract-stub-runner-integration/README.adoc index 23f8df3fbf..c8bcb9fb46 100644 --- a/tests/spring-cloud-contract-stub-runner-integration/README.adoc +++ b/tests/spring-cloud-contract-stub-runner-integration/README.adoc @@ -12,6 +12,10 @@ routes. It's enough to have both Spring Integration and Spring Cloud Contract Stub Runner on classpath. Remember to annotate your test class with `@AutoConfigureStubRunner`. +==== Disabling the functionality + +If you need to disable this functionality just pass `stubrunner.integration.enabled=false` property. + ==== Examples ===== Stubs structure diff --git a/tests/spring-cloud-contract-stub-runner-stream/README.adoc b/tests/spring-cloud-contract-stub-runner-stream/README.adoc index 138aec9262..9e0f1cf08d 100644 --- a/tests/spring-cloud-contract-stub-runner-stream/README.adoc +++ b/tests/spring-cloud-contract-stub-runner-stream/README.adoc @@ -32,6 +32,10 @@ testCompile "org.springframework.cloud:spring-cloud-stream-test-support" It's enough to have both Spring Cloud Stream and Spring Cloud Contract Stub Runner on classpath. Remember to annotate your test class with `@AutoConfigureStubRunner`. +==== Disabling the functionality + +If you need to disable this functionality just pass `stubrunner.stream.enabled=false` property. + ==== Examples ===== Stubs structure