You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/12/17 18:10:53 UTC

[camel] branch master updated (76daaf1 -> 790d7cc)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 76daaf1  CAMEL-12085: Don't mandate header case for cust...
     new cde349f  "CAMEL-12022:direct component - Let the producer able to block and wait for consumers to be started"
     new 6c77004  CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.
     new 790d7cc  CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 camel-core/src/main/docs/direct-component.adoc            |  4 ++--
 camel-core/src/main/docs/direct-vm-component.adoc         |  4 ++--
 .../apache/camel/component/direct/DirectComponent.java    |  4 ++--
 .../org/apache/camel/component/direct/DirectEndpoint.java |  4 ++--
 .../camel/component/directvm/DirectVmComponent.java       |  4 ++--
 .../apache/camel/component/directvm/DirectVmEndpoint.java |  4 ++--
 .../camel/component/direct/DirectNoConsumerTest.java      | 12 +++++++-----
 .../directvm/DirectVmHeaderFilterStrategyTest.java        |  2 +-
 .../camel/component/directvm/DirectVmNoConsumerTest.java  | 12 +++++++-----
 .../DirectVmNoPropertyPropagationComponentTest.java       |  1 +
 .../directvm/DirectVmNoPropertyPropagationTest.java       |  2 +-
 ...ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java |  2 +-
 .../ThrottlingExceptionRoutePolicyHalfOpenTest.java       |  2 +-
 .../routepolicy/quartz/CronScheduledRoutePolicyTest.java  | 12 ++++++++++--
 .../routepolicy/quartz/MultiplePoliciesOnRouteTest.java   |  4 +++-
 .../quartz/SimpleScheduledCombinedRoutePolicyTest.java    |  4 +++-
 .../quartz/SimpleScheduledRoutePolicyTest.java            | 15 +++++++++++----
 .../org/apache/camel/routepolicy/quartz/CronPolicies.xml  |  4 ++++
 .../apache/camel/routepolicy/quartz/SimplePolicies.xml    |  8 ++++++--
 .../routepolicy/quartz2/CronScheduledRoutePolicyTest.java | 13 +++++++++++--
 .../quartz2/SimpleScheduledCombinedRoutePolicyTest.java   |  4 +++-
 .../quartz2/SimpleScheduledRoutePolicyTest.java           | 15 +++++++++++----
 .../org/apache/camel/routepolicy/quartz2/CronPolicies.xml |  4 ++++
 .../apache/camel/routepolicy/quartz2/SimplePolicies.xml   |  4 ++++
 .../direct/springboot/DirectComponentConfiguration.java   |  2 +-
 .../springboot/DirectVmComponentConfiguration.java        |  2 +-
 26 files changed, 103 insertions(+), 45 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].

[camel] 01/03: "CAMEL-12022:direct component - Let the producer able to block and wait for consumers to be started"

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cde349fc9b1e85f9ad6054644a766977ee11a819
Author: Ramu <kk...@redhat.com>
AuthorDate: Fri Dec 1 14:35:37 2017 +0530

    "CAMEL-12022:direct component - Let the producer able to block and wait for consumers to be started"
---
 camel-core/src/main/docs/direct-component.adoc               |  4 ++--
 camel-core/src/main/docs/direct-vm-component.adoc            |  4 ++--
 .../org/apache/camel/component/direct/DirectComponent.java   |  4 ++--
 .../org/apache/camel/component/direct/DirectEndpoint.java    |  4 ++--
 .../apache/camel/component/directvm/DirectVmComponent.java   |  4 ++--
 .../apache/camel/component/directvm/DirectVmEndpoint.java    |  4 ++--
 .../apache/camel/component/direct/DirectNoConsumerTest.java  | 12 +++++++-----
 .../component/directvm/DirectVmHeaderFilterStrategyTest.java |  2 +-
 .../camel/component/directvm/DirectVmNoConsumerTest.java     | 12 +++++++-----
 .../directvm/DirectVmNoPropertyPropagationComponentTest.java |  1 +
 .../directvm/DirectVmNoPropertyPropagationTest.java          |  2 +-
 .../ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java   |  2 +-
 .../ThrottlingExceptionRoutePolicyHalfOpenTest.java          |  2 +-
 .../direct/springboot/DirectComponentConfiguration.java      |  2 +-
 .../directvm/springboot/DirectVmComponentConfiguration.java  |  2 +-
 15 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/camel-core/src/main/docs/direct-component.adoc b/camel-core/src/main/docs/direct-component.adoc
index 4c035b6..6dea0bc 100644
--- a/camel-core/src/main/docs/direct-component.adoc
+++ b/camel-core/src/main/docs/direct-component.adoc
@@ -36,7 +36,7 @@ The Direct component supports 3 options which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | false | boolean
+| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | true | boolean
 | *timeout* (producer) | The timeout value to use if block is enabled. | 30000 | long
 | *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
 |===
@@ -70,7 +70,7 @@ with the following path and query parameters:
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored. | false | boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored. |  | ExceptionHandler
 | *exchangePattern* (consumer) | Sets the default exchange pattern when creating an exchange. |  | ExchangePattern
-| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | false | boolean
+| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | true | boolean
 | *failIfNoConsumers* (producer) | Whether the producer should fail by throwing an exception when sending to a DIRECT endpoint with no active consumers. | false | boolean
 | *timeout* (producer) | The timeout value to use if block is enabled. | 30000 | long
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
diff --git a/camel-core/src/main/docs/direct-vm-component.adoc b/camel-core/src/main/docs/direct-vm-component.adoc
index d6f7b21..77f5ace 100644
--- a/camel-core/src/main/docs/direct-vm-component.adoc
+++ b/camel-core/src/main/docs/direct-vm-component.adoc
@@ -47,7 +47,7 @@ The Direct VM component supports 5 options which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | false | boolean
+| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | true | boolean
 | *timeout* (producer) | The timeout value to use if block is enabled. | 30000 | long
 | *headerFilterStrategy* (advanced) | Sets a HeaderFilterStrategy that will only be applied on producer endpoints (on both directions: request and response). Default value: none. |  | HeaderFilterStrategy
 | *propagateProperties* (advanced) | Whether to propagate or not properties from the producer side to the consumer side and vice versa. Default value: true. | true | boolean
@@ -83,7 +83,7 @@ with the following path and query parameters:
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored. | false | boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored. |  | ExceptionHandler
 | *exchangePattern* (consumer) | Sets the default exchange pattern when creating an exchange. |  | ExchangePattern
-| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | false | boolean
+| *block* (producer) | If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active. | true | boolean
 | *failIfNoConsumers* (producer) | Whether the producer should fail by throwing an exception when sending to a Direct-VM endpoint with no active consumers. | false | boolean
 | *timeout* (producer) | The timeout value to use if block is enabled. | 30000 | long
 | *headerFilterStrategy* (producer) | Sets a HeaderFilterStrategy that will only be applied on producer endpoints (on both directions: request and response). Default value: none. |  | HeaderFilterStrategy
diff --git a/camel-core/src/main/java/org/apache/camel/component/direct/DirectComponent.java b/camel-core/src/main/java/org/apache/camel/component/direct/DirectComponent.java
index 200f688..e1dee25 100644
--- a/camel-core/src/main/java/org/apache/camel/component/direct/DirectComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/direct/DirectComponent.java
@@ -35,8 +35,8 @@ public class DirectComponent extends UriEndpointComponent {
     // later in case the DirectEndpoint was re-created due the old was evicted from the endpoints LRUCache
     // on DefaultCamelContext
     private final Map<String, DirectConsumer> consumers = new HashMap<String, DirectConsumer>();
-    @Metadata(label = "producer")
-    private boolean block;
+    @Metadata(label = "producer", defaultValue = "true" )
+    private boolean block = true;
     @Metadata(label = "producer", defaultValue = "30000")
     private long timeout = 30000L;
 
diff --git a/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
index 855a30d..cf3db04 100644
--- a/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
@@ -43,8 +43,8 @@ public class DirectEndpoint extends DefaultEndpoint {
     @UriPath(description = "Name of direct endpoint") @Metadata(required = "true")
     private String name;
 
-    @UriParam(label = "producer")
-    private boolean block;
+    @UriParam(label = "producer", defaultValue = "true")
+    private boolean block = true;
     @UriParam(label = "producer", defaultValue = "30000")
     private long timeout = 30000L;
     @UriParam(label = "producer")
diff --git a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmComponent.java b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmComponent.java
index 26ecca8..0577e3a 100644
--- a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmComponent.java
@@ -39,8 +39,8 @@ public class DirectVmComponent extends UriEndpointComponent {
     // later in case the DirectVmEndpoint was re-created due the old was evicted from the endpoints LRUCache
     // on DefaultCamelContext
     private static final ConcurrentMap<String, DirectVmConsumer> CONSUMERS = new ConcurrentHashMap<String, DirectVmConsumer>();
-    @Metadata(label = "producer")
-    private boolean block;
+    @Metadata(label = "producer", defaultValue = "true")
+    private boolean block = true;
     @Metadata(label = "producer", defaultValue = "30000")
     private long timeout = 30000L;
     @Metadata(label = "advanced")
diff --git a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
index 9ecdeab..b4188cf 100644
--- a/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmEndpoint.java
@@ -39,8 +39,8 @@ public class DirectVmEndpoint extends DefaultEndpoint implements AsyncEndpoint {
     @UriPath(description = "Name of direct-vm endpoint") @Metadata(required = "true")
     private String name;
 
-    @UriParam(label = "producer")
-    private boolean block;
+    @UriParam(label = "producer", defaultValue = "true")
+    private boolean block = true;
     @UriParam(label = "producer", defaultValue = "30000")
     private long timeout = 30000L;
     @UriParam(label = "producer")
diff --git a/camel-core/src/test/java/org/apache/camel/component/direct/DirectNoConsumerTest.java b/camel-core/src/test/java/org/apache/camel/component/direct/DirectNoConsumerTest.java
index a756ea6..19366ff 100644
--- a/camel-core/src/test/java/org/apache/camel/component/direct/DirectNoConsumerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/direct/DirectNoConsumerTest.java
@@ -82,7 +82,7 @@ public class DirectNoConsumerTest extends ContextTestSupport {
         try {
             template.sendBody("direct:start", "Hello World");
         } catch (CamelExecutionException e) {
-            fail("Should not throw an exception");
+            assertIsInstanceOf(DirectConsumerNotAvailableException.class, e.getCause());
         }
     }
 
@@ -146,10 +146,12 @@ public class DirectNoConsumerTest extends ContextTestSupport {
         context.start();
 
         getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
-
-        template.sendBody("direct:in", "Hello World");
-
-        assertMockEndpointsSatisfied();
+        try {
+            template.sendBody("direct:in", "Hello World");
+            fail("Should throw an exception");
+        } catch (CamelExecutionException e) {
+            assertIsInstanceOf(DirectConsumerNotAvailableException.class, e.getCause());
+        }
 
     }
 
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmHeaderFilterStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmHeaderFilterStrategyTest.java
index 5386774..ffb319d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmHeaderFilterStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmHeaderFilterStrategyTest.java
@@ -40,7 +40,7 @@ public class DirectVmHeaderFilterStrategyTest extends ContextTestSupport {
             }
         });
         
-        Exchange response = template.request("direct-vm:start.filter?headerFilterStrategy=#headerFilterStrategy", exchange -> {
+        Exchange response = template.request("direct-vm:start.filter?headerFilterStrategy=#headerFilterStrategy&block=false", exchange -> {
             exchange.getIn().setBody("Hello World");
             exchange.getIn().setHeader("Header1", "Value1");
         });
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoConsumerTest.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoConsumerTest.java
index ae97899..9e0ff4d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoConsumerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoConsumerTest.java
@@ -82,7 +82,7 @@ public class DirectVmNoConsumerTest extends ContextTestSupport {
         try {
             template.sendBody("direct-vm:start", "Hello World");
         } catch (CamelExecutionException e) {
-            fail("Should not throw an exception");
+            assertIsInstanceOf(DirectVmConsumerNotAvailableException.class, e.getCause());
         }
     }
 
@@ -146,10 +146,12 @@ public class DirectVmNoConsumerTest extends ContextTestSupport {
         context.start();
 
         getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
-
-        template.sendBody("direct-vm:in", "Hello World");
-
-        assertMockEndpointsSatisfied();
+        try {
+            template.sendBody("direct-vm:in", "Hello World");
+            fail("Should throw an exception");
+        } catch (CamelExecutionException e) {
+            assertIsInstanceOf(DirectVmConsumerNotAvailableException.class, e.getCause());
+        }
 
     }
 
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationComponentTest.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationComponentTest.java
index 23b2598..8e4d09b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationComponentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationComponentTest.java
@@ -31,6 +31,7 @@ public class DirectVmNoPropertyPropagationComponentTest extends ContextTestSuppo
         
         DirectVmComponent directvm = new DirectVmComponent();
         directvm.setPropagateProperties(false);
+        directvm.setBlock(false);
         context.addComponent("direct-vm", directvm);
         
         return context;
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationTest.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationTest.java
index 6a94bba..b64f4c8 100644
--- a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmNoPropertyPropagationTest.java
@@ -36,7 +36,7 @@ public class DirectVmNoPropertyPropagationTest extends ContextTestSupport {
                 // Starters.
                 from("direct-vm:start.noprops")
                     .setProperty("abc", constant("def"))
-                    .to("direct-vm:foo.noprops?propagateProperties=false");
+                    .to("direct-vm:foo.noprops?propagateProperties=false&block=false");
                 
                 from("direct-vm:start.props")
                     .setProperty("abc", constant("def"))
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
index 1b5b0f3..24e2f5f 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
@@ -38,7 +38,7 @@ import static org.awaitility.Awaitility.await;
 public class ThrottlingExceptionRoutePolicyHalfOpenHandlerTest extends ContextTestSupport {
     private static Logger log = LoggerFactory.getLogger(ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.class);
     
-    private String url = "direct:start";
+    private String url = "direct:start?block=false";
     private MockEndpoint result;
     
     @Before
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
index 8bae664..49ff49a 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
@@ -37,7 +37,7 @@ import static org.awaitility.Awaitility.await;
 public class ThrottlingExceptionRoutePolicyHalfOpenTest extends ContextTestSupport {
     private static Logger log = LoggerFactory.getLogger(ThrottlingExceptionRoutePolicyHalfOpenTest.class);
     
-    private String url = "direct:start";
+    private String url = "direct:start?block=false";
     private MockEndpoint result;
     
     @Before
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java
index 37a4a43..5a77b96 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/direct/springboot/DirectComponentConfiguration.java
@@ -37,7 +37,7 @@ public class DirectComponentConfiguration
      * then we can tell the producer to block and wait for the consumer to
      * become active.
      */
-    private Boolean block = false;
+    private Boolean block = true;
     /**
      * The timeout value to use if block is enabled.
      */
diff --git a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java
index f87ab23..2c7787b 100644
--- a/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-core-starter/src/main/java/org/apache/camel/component/directvm/springboot/DirectVmComponentConfiguration.java
@@ -39,7 +39,7 @@ public class DirectVmComponentConfiguration
      * then we can tell the producer to block and wait for the consumer to
      * become active.
      */
-    private Boolean block = false;
+    private Boolean block = true;
     /**
      * The timeout value to use if block is enabled.
      */

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.

[camel] 03/03: CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 790d7cca89e72ff65c517a94f78ecef33cb6490e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 17 18:15:38 2017 +0100

    CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.
---
 .../routepolicy/quartz/CronScheduledRoutePolicyTest.java  | 12 ++++++++++--
 .../routepolicy/quartz/MultiplePoliciesOnRouteTest.java   |  4 +++-
 .../quartz/SimpleScheduledCombinedRoutePolicyTest.java    |  4 +++-
 .../quartz/SimpleScheduledRoutePolicyTest.java            | 15 +++++++++++----
 .../org/apache/camel/routepolicy/quartz/CronPolicies.xml  |  4 ++++
 .../apache/camel/routepolicy/quartz/SimplePolicies.xml    |  8 ++++++--
 6 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
index 7f76119..f1f1229 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/CronScheduledRoutePolicyTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.SuspendableService;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -45,6 +46,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
         success1.expectedMessageCount(1);
         success2.expectedMessageCount(1);
 
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
 
         context.addRoutes(new RouteBuilder() {
@@ -79,6 +81,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicyWithTwoRoutes() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -110,7 +113,8 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
 
         context.addRoutes(new RouteBuilder() {
@@ -137,6 +141,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -161,6 +166,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStopRoutePolicyWithExtraPolicy() throws Exception {
         final MyRoutePolicy myPolicy = new MyRoutePolicy();
 
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -186,6 +192,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     
     @Test
     public void testScheduledSuspendRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -213,7 +220,8 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
index f1a21e8..42e3a80 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
@@ -20,6 +20,7 @@ import java.util.Date;
 
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz.QuartzComponent;
 import org.apache.camel.impl.JndiRegistry;
@@ -68,7 +69,8 @@ public class MultiplePoliciesOnRouteTest extends CamelTestSupport {
     public void testMultiplePoliciesOnRoute() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);        
         success.expectedMinimumMessageCount(size - 10);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {   
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
index c369eea..62d905d 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
@@ -20,6 +20,7 @@ import java.util.Date;
 
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -39,7 +40,8 @@ public class SimpleScheduledCombinedRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartAndStopRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);        
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {   
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicyTest.java b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicyTest.java
index e87d04f..cfd3e28 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicyTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledRoutePolicyTest.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -45,7 +46,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);        
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {   
@@ -74,6 +76,7 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -107,6 +110,7 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     
     @Test
     public void testScheduledSuspendRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -140,7 +144,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -177,7 +182,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledSuspendAndResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -217,7 +223,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledSuspendAndRestartPolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
diff --git a/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/CronPolicies.xml b/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/CronPolicies.xml
index d93d3b0..edc91aa 100644
--- a/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/CronPolicies.xml
+++ b/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/CronPolicies.xml
@@ -42,6 +42,10 @@
     <property name="routeResumeTime" value="*/3 * * * * ?"/>
   </bean>
 
+  <bean id="direct" class="org.apache.camel.component.direct.DirectComponent">
+    <property name="block" value="false"/>
+  </bean>
+
   <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
     <route id="testRoute">
       <from uri="direct:start"/>
diff --git a/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/SimplePolicies.xml b/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/SimplePolicies.xml
index dfbde4a..0a19340 100644
--- a/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/SimplePolicies.xml
+++ b/components/camel-quartz/src/test/resources/org/apache/camel/routepolicy/quartz/SimplePolicies.xml
@@ -52,8 +52,12 @@
        	<property name="routeResumeDate" ref="now"/>
     	<property name="routeResumeRepeatCount" value="1"/>
     	<property name="routeResumeRepeatInterval" value="3000"/>    	
- 	</bean> 
- 	
+ 	</bean>
+
+  <bean id="direct" class="org.apache.camel.component.direct.DirectComponent">
+    <property name="block" value="false"/>
+  </bean>
+
     <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
         <route id="testRoute">
             <from uri="direct:start"/>

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.

[camel] 02/03: CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6c770048826e688e0c0e6d5f6929778e6bdeee27
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 17 16:50:45 2017 +0100

    CAMEL-1202: use the old default of not block for direct in these tests as they rely on that.
---
 .../routepolicy/quartz2/CronScheduledRoutePolicyTest.java | 13 +++++++++++--
 .../quartz2/SimpleScheduledCombinedRoutePolicyTest.java   |  4 +++-
 .../quartz2/SimpleScheduledRoutePolicyTest.java           | 15 +++++++++++----
 .../org/apache/camel/routepolicy/quartz2/CronPolicies.xml |  4 ++++
 .../apache/camel/routepolicy/quartz2/SimplePolicies.xml   |  4 ++++
 5 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicyTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicyTest.java
index 73ec425..e8b6b79 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicyTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicyTest.java
@@ -24,6 +24,7 @@ import org.apache.camel.Route;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.SuspendableService;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz2.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -47,6 +48,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
         success1.expectedMessageCount(1);
         success2.expectedMessageCount(1);
 
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
 
         context.addRoutes(new RouteBuilder() {
@@ -81,6 +83,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicyWithTwoRoutes() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -112,7 +115,8 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
 
         context.addRoutes(new RouteBuilder() {
@@ -139,6 +143,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -167,6 +172,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
         final CountDownLatch startedLatch = new CountDownLatch(1);
         final CountDownLatch stoppedLatch = new CountDownLatch(1);
 
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -217,6 +223,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStopRoutePolicyWithExtraPolicy() throws Exception {
         final MyRoutePolicy myPolicy = new MyRoutePolicy();
 
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -242,6 +249,7 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     
     @Test
     public void testScheduledSuspendRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -269,7 +277,8 @@ public class CronScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledCombinedRoutePolicyTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledCombinedRoutePolicyTest.java
index e839274..5b3f623 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledCombinedRoutePolicyTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledCombinedRoutePolicyTest.java
@@ -20,6 +20,7 @@ import java.util.Date;
 
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz2.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -36,7 +37,8 @@ public class SimpleScheduledCombinedRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartAndStopRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);        
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {   
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicyTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicyTest.java
index c2dcbd6..0527b93 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicyTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SimpleScheduledRoutePolicyTest.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.direct.DirectComponent;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.quartz2.QuartzComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -42,7 +43,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledStartRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);        
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {   
@@ -71,6 +73,7 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
 
     @Test
     public void testScheduledStopRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -104,6 +107,7 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     
     @Test
     public void testScheduledSuspendRoutePolicy() throws Exception {
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -137,7 +141,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -174,7 +179,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledSuspendAndResumeRoutePolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
@@ -215,7 +221,8 @@ public class SimpleScheduledRoutePolicyTest extends CamelTestSupport {
     public void testScheduledSuspendAndRestartPolicy() throws Exception {
         MockEndpoint success = context.getEndpoint("mock:success", MockEndpoint.class);
         success.expectedMessageCount(1);
-        
+
+        context.getComponent("direct", DirectComponent.class).setBlock(false);
         context.getComponent("quartz2", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz2/myquartz.properties");
         context.addRoutes(new RouteBuilder() {
             public void configure() {
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
index 8a69711..23bc973 100644
--- a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
@@ -42,6 +42,10 @@
     <property name="routeResumeTime" value="*/3 * * * * ?"/>
   </bean>
 
+  <bean id="direct" class="org.apache.camel.component.direct.DirectComponent">
+    <property name="block" value="false"/>
+  </bean>
+
   <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
     <route id="testRoute">
       <from uri="direct:start"/>
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
index 5c716b7..7dc3d8a 100644
--- a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
@@ -54,6 +54,10 @@
     <property name="routeResumeRepeatInterval" value="3000"/>
   </bean>
 
+  <bean id="direct" class="org.apache.camel.component.direct.DirectComponent">
+    <property name="block" value="false"/>
+  </bean>
+
   <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
     <route id="testRoute">
       <from uri="direct:start"/>

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.