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 e6548a3d6fc2f8f767d603a1a6873908bf01df40 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jun 7 12:12:52 2019 +0200 CAMEL-13515: Allow producer to lazy start until first message --- .../camel/component/validator/ValidatorLazyStartProducerTest.java | 8 ++++---- .../test/java/org/apache/camel/impl/LazyStartProducerTest.java | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorLazyStartProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorLazyStartProducerTest.java index a1565e7..937ef6b 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorLazyStartProducerTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorLazyStartProducerTest.java @@ -1,13 +1,13 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java index 1f9afda..f6c0749 100644 --- a/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java @@ -40,10 +40,12 @@ public class LazyStartProducerTest extends ContextTestSupport { LazyStartProducer lazy = new LazyStartProducer(mock); assertFalse(ServiceHelper.isStarted(lazy)); assertFalse(ServiceHelper.isStarted(lazy.getProcessor())); + assertEquals(mock.isSingleton(), lazy.isSingleton()); ServiceHelper.startService(lazy); assertTrue(ServiceHelper.isStarted(lazy)); assertFalse(ServiceHelper.isStarted(lazy.getProcessor())); + assertEquals(mock.isSingleton(), lazy.isSingleton()); // process a message which should start the delegate Exchange exchange = mock.createExchange(); @@ -51,6 +53,7 @@ public class LazyStartProducerTest extends ContextTestSupport { lazy.process(exchange); assertTrue(ServiceHelper.isStarted(lazy)); assertTrue(ServiceHelper.isStarted(lazy.getProcessor())); + assertEquals(mock.isSingleton(), lazy.isSingleton()); // process a message which should start the delegate exchange = mock.createExchange(); @@ -58,6 +61,7 @@ public class LazyStartProducerTest extends ContextTestSupport { lazy.process(exchange); assertTrue(ServiceHelper.isStarted(lazy)); assertTrue(ServiceHelper.isStarted(lazy.getProcessor())); + assertEquals(mock.isSingleton(), lazy.isSingleton()); assertMockEndpointsSatisfied(); }