You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/01/30 14:38:54 UTC
[camel] branch main updated: (chores) camel-core: use log markers in tests
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new f3ca8739c7f (chores) camel-core: use log markers in tests
f3ca8739c7f is described below
commit f3ca8739c7fad550c3481a355d97b7a3e4ab7c6f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Jan 30 11:28:44 2023 +0100
(chores) camel-core: use log markers in tests
---
.../test/java/org/apache/camel/TestSupport.java | 2 +-
.../org/apache/camel/TestSupportJmxCleanup.java | 2 +-
.../camel/builder/BuilderWithScopesTest.java | 2 +-
.../camel/builder/ContextErrorHandlerTest.java | 2 +-
.../camel/builder/MyInterceptorProcessor.java | 4 ++--
.../java/org/apache/camel/builder/MyProcessor.java | 2 +-
.../org/apache/camel/builder/RouteBuilderTest.java | 22 +++++++++++-----------
.../bean/BeanWithExpressionInjectionTest.java | 2 +-
.../bean/BeanWithHeadersAndBodyInject2Test.java | 4 ++--
.../bean/BeanWithHeadersAndBodyInjectionTest.java | 2 +-
.../BeanWithPropertiesAndHeadersInjectionTest.java | 2 +-
.../BodyAnnotationToDisambiguateMethodsTest.java | 4 ++--
...ressionAnnotationToDisambiguateMethodsTest.java | 4 ++--
.../camel/component/bean/PredicateAsBeanTest.java | 2 +-
.../camel/component/dataset/CustomDataSetTest.java | 2 +-
.../FileConsumerThreadsInProgressIssueTest.java | 4 ++--
.../file/FileExclusiveReadNoneStrategyTest.java | 2 +-
.../strategy/FileChangedReadLockMinAgeTest.java | 2 +-
.../file/strategy/FileChangedReadLockTest.java | 2 +-
.../MarkerFileExclusiveReadLockStrategyTest.java | 2 +-
.../apache/camel/component/log/LogRouteTest.java | 2 +-
.../seda/DirectRequestReplyAndSedaInOnlyTest.java | 2 +-
.../apache/camel/component/seda/SedaRouteTest.java | 4 ++--
.../ValidatorEndpointClearCachedSchemaTest.java | 2 +-
.../org/apache/camel/converter/ConverterTest.java | 6 +++---
.../java/org/apache/camel/converter/JaxpTest.java | 8 ++++----
.../converter/PrimitiveTypeConverterIssueTest.java | 2 +-
.../PropertyEditorTypeConverterIssueTest.java | 2 +-
.../camel/impl/ClassicUuidGeneratorTest.java | 6 +++---
.../camel/impl/DefaultUuidGeneratorTest.java | 6 +++---
.../apache/camel/impl/ShortUuidGeneratorTest.java | 6 +++---
.../apache/camel/impl/SimpleUuidGeneratorTest.java | 6 +++---
.../impl/TypeConverterRegistryPerformanceTest.java | 2 +-
.../camel/impl/VanillaUuidGeneratorTest.java | 6 +++---
.../event/EventNotifierExchangeCompletedTest.java | 2 +-
.../issues/AdviceWithStartTargetIssueTest.java | 2 +-
.../org/apache/camel/issues/DavidSiefertTest.java | 2 +-
.../apache/camel/issues/RomeksExceptionTest.java | 4 ++--
.../camel/issues/SetHeaderInDoCatchIssueTest.java | 6 +++---
.../camel/issues/SplitterParallelIssueTest.java | 2 +-
...irIteratorSplitChoicePerformanceManualTest.java | 14 +++++++-------
.../language/XPathRouteConcurrentBigTest.java | 2 +-
.../XPathSplitChoicePerformanceManualTest.java | 16 ++++++++--------
.../model/GenerateXmFromCamelContextTest.java | 4 ++--
.../org/apache/camel/model/GenerateXmlTest.java | 2 +-
.../org/apache/camel/model/XmlTestSupport.java | 4 ++--
.../BeanOgnMethodWithXPathInjectionTest.java | 2 +-
.../camel/processor/BeanWithExceptionTest.java | 2 +-
.../BeanWithXPathInjectionPreCompileTest.java | 2 +-
.../processor/BeanWithXPathInjectionTest.java | 2 +-
.../CreateRouteWithNonExistingEndpointTest.java | 2 +-
.../RedeliveryPolicyPerExceptionTest.java | 4 ++--
.../processor/SendToNonExistingEndpointTest.java | 2 +-
.../camel/processor/SplitAggregateInOutTest.java | 10 +++++-----
.../SplitterParallelBigFileManualTest.java | 2 +-
.../processor/SplitterStreamingUoWIssueTest.java | 2 +-
.../camel/processor/SplitterWithXqureyTest.java | 2 +-
...xceptionRoutePolicyHalfOpenHandlerSedaTest.java | 2 +-
...ingExceptionRoutePolicyHalfOpenHandlerTest.java | 2 +-
...ThrottlingExceptionRoutePolicyHalfOpenTest.java | 2 +-
.../UnitOfWorkSynchronizationAdapterTest.java | 2 +-
.../org/apache/camel/processor/UnitOfWorkTest.java | 6 +++---
.../AggregateNewExchangeAndConfirmTest.java | 2 +-
.../AggregateSimpleExpressionIssueManualTest.java | 8 ++++----
.../aggregator/AlbertoAggregatorTest.java | 12 ++++++------
.../async/AsyncEndpointEventNotifierTest.java | 2 +-
.../camel/processor/async/MyAsyncProducer.java | 6 +++---
.../resequencer/ResequencerEngineTest.java | 2 +-
68 files changed, 134 insertions(+), 134 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
index 35bcab95d6c..938ee3e0e36 100644
--- a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
@@ -321,7 +321,7 @@ public abstract class TestSupport {
try {
PredicateAssertHelper.assertMatches(predicate, "Predicate should match: ", exchange);
} catch (AssertionError e) {
- LOG.debug("Caught expected assertion error: " + e);
+ LOG.debug("Caught expected assertion error: {}", e.getMessage(), e);
}
assertPredicate(predicate, exchange, false);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java b/core/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
index ffe8c4b2094..426da86609f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
+++ b/core/camel-core/src/test/java/org/apache/camel/TestSupportJmxCleanup.java
@@ -52,7 +52,7 @@ public final class TestSupportJmxCleanup {
if (s.size() > 0) {
LOG.warn(" + {} ObjectNames registered in domain \"{}\"", s.size(), d);
for (ObjectName on : s) {
- LOG.warn(" | " + on);
+ LOG.warn(" | {}", on);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
index 9d877c8ccfa..9fcc18d432e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
@@ -104,7 +104,7 @@ public class BuilderWithScopesTest extends TestSupport {
Producer producer = endpoint.createProducer();
producer.process(exchange);
- log.debug("Invocation order:" + order);
+ log.debug("Invocation order: {}", order);
assertEquals(expected, order);
container.stop();
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/ContextErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/ContextErrorHandlerTest.java
index 88fa1abf00a..a2104509630 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/ContextErrorHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/ContextErrorHandlerTest.java
@@ -89,7 +89,7 @@ public class ContextErrorHandlerTest extends ContextTestSupport {
Channel channel = unwrapChannel(processor);
assertIsInstanceOf(DeadLetterChannel.class, channel.getErrorHandler());
SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, channel.getNextProcessor());
- log.debug("Found sendProcessor: " + sendProcessor);
+ log.debug("Found sendProcessor: {}", sendProcessor);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java b/core/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
index 22b7353c316..977811d05e2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
@@ -26,8 +26,8 @@ public class MyInterceptorProcessor extends DelegateProcessor {
@Override
public void process(Exchange exchange) throws Exception {
- LOG.debug("START of onExchange: " + exchange);
+ LOG.debug("START of onExchange: {}", exchange);
super.process(exchange);
- LOG.debug("END of onExchange: " + exchange);
+ LOG.debug("END of onExchange: {}", exchange);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java b/core/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
index 5a9377828cf..c96c3a900fd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
@@ -26,7 +26,7 @@ public class MyProcessor implements Processor {
@Override
public void process(Exchange exchange) {
- LOG.debug("Called with exchange: " + exchange);
+ LOG.debug("Called with exchange: {}", exchange);
}
@Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
index 183b91959f8..59f430c328d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
@@ -111,7 +111,7 @@ public class RouteBuilderTest extends TestSupport {
public void testSimpleRouteWithHeaderPredicate() throws Exception {
List<Route> routes = buildSimpleRouteWithHeaderPredicate();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -146,7 +146,7 @@ public class RouteBuilderTest extends TestSupport {
public void testSimpleRouteWithChoice() throws Exception {
List<Route> routes = buildSimpleRouteWithChoice();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -174,7 +174,7 @@ public class RouteBuilderTest extends TestSupport {
// START SNIPPET: e4
myProcessor = new Processor() {
public void process(Exchange exchange) {
- log.debug("Called with exchange: " + exchange);
+ log.debug("Called with exchange: {}", exchange);
}
};
@@ -217,7 +217,7 @@ public class RouteBuilderTest extends TestSupport {
public void testCustomProcessorWithFilter() throws Exception {
List<Route> routes = buildCustomProcessorWithFilter();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -243,7 +243,7 @@ public class RouteBuilderTest extends TestSupport {
public void testWireTap() throws Exception {
List<Route> routes = buildWireTap();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -283,7 +283,7 @@ public class RouteBuilderTest extends TestSupport {
List<Route> routes = buildRouteWithInterceptor();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -315,7 +315,7 @@ public class RouteBuilderTest extends TestSupport {
// END SNIPPET: e7
List<Route> routes = getRouteList(builder);
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -355,7 +355,7 @@ public class RouteBuilderTest extends TestSupport {
List<Route> routes = buildDynamicRecipientList();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -397,7 +397,7 @@ public class RouteBuilderTest extends TestSupport {
List<Route> routes = buildSplitter();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -430,7 +430,7 @@ public class RouteBuilderTest extends TestSupport {
List<Route> routes = buildIdempotentConsumer();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
@@ -468,7 +468,7 @@ public class RouteBuilderTest extends TestSupport {
List<Route> routes = buildThreads();
- log.debug("Created routes: " + routes);
+ log.debug("Created routes: {}", routes);
assertEquals(1, routes.size(), "Number routes created");
for (Route route : routes) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
index faa1c8529fe..53c52e0ac55 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
@@ -70,7 +70,7 @@ public class BeanWithExpressionInjectionTest extends ContextTestSupport {
public void read(String body, @Simple("${header.foo}") String foo) {
this.foo = foo;
this.body = body;
- LOG.info("read() method called on " + this);
+ LOG.info("read() method called on {}", this);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
index 4b846c333dc..87d4ede2e0e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
@@ -115,8 +115,8 @@ public class BeanWithHeadersAndBodyInject2Test extends ContextTestSupport {
public List<User> users;
public void myMethod(@Header(value = "users") List<User> users, Object body) {
- LOG.info("myMethod() method called on " + this);
- LOG.info(" users " + users);
+ LOG.info("myMethod() method called on {}", this);
+ LOG.info(" users {}", users);
this.body = body;
this.users = users;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
index 314a1edce3e..3a541eec935 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
@@ -87,7 +87,7 @@ public class BeanWithHeadersAndBodyInjectionTest extends ContextTestSupport {
public void myMethod(@Headers Map<String, Object> headers, Object body) {
this.headers = headers;
this.body = body;
- LOG.info("myMethod() method called on " + this);
+ LOG.info("myMethod() method called on {}", this);
}
public void anotherMethod(@Headers Map<String, Object> headers, Object body) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
index d9d28244235..1560728a5dc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
@@ -91,7 +91,7 @@ public class BeanWithPropertiesAndHeadersInjectionTest extends ContextTestSuppor
public void myMethod(@ExchangeProperties Map<?, ?> foo, @Headers Map<?, ?> bar) {
this.foo = foo;
this.bar = bar;
- LOG.info("myMethod() method called on " + this);
+ LOG.info("myMethod() method called on {}", this);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
index 60c4cba2706..942bd8237ea 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
@@ -66,11 +66,11 @@ public class BodyAnnotationToDisambiguateMethodsTest extends ContextTestSupport
public void foo(@Body String body) {
this.body = body;
- LOG.info("foo() method called on " + this);
+ LOG.info("foo() method called on {}", this);
}
public void wrongMethod(String body) {
- fail("wrongMethod() called with: " + body);
+ fail("wrongMethod() called with: {}" + body);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
index f3f8c0752eb..40ca06cca72 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
@@ -76,7 +76,7 @@ public class ExpressionAnnotationToDisambiguateMethodsTest extends ContextTestSu
public void foo(@Simple("${header.foo}") String bar) {
this.bar = bar;
- LOG.info("foo() method called with: " + bar);
+ LOG.info("foo() method called with: {}", bar);
}
public void wrongMethod(String body) {
@@ -94,7 +94,7 @@ public class ExpressionAnnotationToDisambiguateMethodsTest extends ContextTestSu
@Handler
public void foo(@Simple("${header.foo}") String bar) {
this.bar = bar;
- LOG.info("foo() method called with: " + bar);
+ LOG.info("foo() method called with: {}", bar);
}
public void wrongMethod(String body) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
index ba09e5796a3..70ed9c38fbe 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
@@ -62,7 +62,7 @@ public class PredicateAsBeanTest extends ContextTestSupport {
@Override
public boolean matches(Exchange exchange) {
- LOG.info("matches(exchange) called with: " + exchange);
+ LOG.info("matches(exchange) called with: {}", exchange);
body = exchange.getIn().getBody(String.class);
return null != body && body.equals("Wobble");
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
index 142c7d2b006..54a3218f5f7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
@@ -38,7 +38,7 @@ public class CustomDataSetTest extends ContextTestSupport {
throws Exception {
// lets compare the XPath result
Predicate predicate = PredicateBuilder.isEqualTo(expression, ExpressionBuilder.constantExpression(index));
- log.debug("evaluating predicate: " + predicate);
+ log.debug("evaluating predicate: {}", predicate);
PredicateAssertHelper.assertMatches(predicate, "Actual: " + actual, actual);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
index 5b53f9fdf4d..0366d265ba8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
@@ -75,7 +75,7 @@ public class FileConsumerThreadsInProgressIssueTest extends ContextTestSupport {
Integer count = ent.getValue();
if (count > 1) {
found++;
- log.info(ent.getKey() + " :: " + count);
+ log.info("{} :: {}", ent.getKey(), count);
}
}
@@ -108,7 +108,7 @@ public class FileConsumerThreadsInProgressIssueTest extends ContextTestSupport {
integer++;
duplicate.put(exchange.getExchangeId(), integer);
}
- log.info("Process called for-" + exchange.getExchangeId());
+ log.info("Process called for-{}", exchange.getExchangeId());
Thread.sleep(20);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadNoneStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadNoneStrategyTest.java
index 37a66f180d4..663a515ad9b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadNoneStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadNoneStrategyTest.java
@@ -61,7 +61,7 @@ public class FileExclusiveReadNoneStrategyTest extends ContextTestSupport {
mock.assertIsSatisfied();
String body = mock.getReceivedExchanges().get(0).getIn().getBody(String.class);
- LOG.debug("Body is: " + body);
+ LOG.debug("Body is: {}", body);
assertFalse(body.endsWith("Bye World"), "Should not wait and read the entire file");
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
index b43e14c7623..df7283bc535 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
@@ -60,7 +60,7 @@ public class FileChangedReadLockMinAgeTest extends ContextTestSupport {
try (OutputStream fos = Files.newOutputStream(testFile("in/slowfile.dat"))) {
for (int i = 0; i < 20; i++) {
fos.write(("Line " + i + LS).getBytes());
- LOG.debug("Writing line " + i);
+ LOG.debug("Writing line {}", i);
Thread.sleep(50);
}
fos.flush();
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
index 0f782de4f80..0a4724842eb 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
@@ -67,7 +67,7 @@ public class FileChangedReadLockTest extends ContextTestSupport {
try (OutputStream fos = Files.newOutputStream(testFile("in/slowfile.dat"))) {
for (int i = 0; i < 20; i++) {
fos.write(("Line " + i + LS).getBytes());
- LOG.debug("Writing line " + i);
+ LOG.debug("Writing line {}", i);
Thread.sleep(50);
}
fos.flush();
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
index f7270af4326..a497db1b99c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
@@ -84,7 +84,7 @@ public class MarkerFileExclusiveReadLockStrategyTest extends ContextTestSupport
for (int i = 0; i < 20; i++) {
fos.write(("Line " + i + LS).getBytes());
fos2.write(("Line " + i + LS).getBytes());
- LOG.debug("Writing line " + i);
+ LOG.debug("Writing line {}", i);
}
fos.flush();
fos2.flush();
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/log/LogRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/log/LogRouteTest.java
index 8ee67749ad8..2ecbe758df9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/log/LogRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/log/LogRouteTest.java
@@ -48,7 +48,7 @@ public class LogRouteTest extends ContextTestSupport {
() -> template.sendBody("log:org.apache.camel.TEST?level=noSuchLevel", "<level>noSuchLevel</level>"),
"Should have failed!");
- LOG.debug("Caught expected exception: " + ex.getMessage(), ex);
+ LOG.debug("Caught expected exception: {}", ex.getMessage(), ex);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/DirectRequestReplyAndSedaInOnlyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/DirectRequestReplyAndSedaInOnlyTest.java
index 51d1b569f2b..0bde359562a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/DirectRequestReplyAndSedaInOnlyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/DirectRequestReplyAndSedaInOnlyTest.java
@@ -31,7 +31,7 @@ public class DirectRequestReplyAndSedaInOnlyTest extends ContextTestSupport {
String out = template.requestBody("direct:start", "Hello World", String.class);
assertEquals("Bye World", out);
- log.info("Got reply " + out);
+ log.info("Got reply {}", out);
assertMockEndpointsSatisfied();
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
index 75ba2fba74c..83ff987e258 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
@@ -48,7 +48,7 @@ public class SedaRouteTest extends TestSupport {
from("seda:test.a").to("seda:test.b");
from("seda:test.b").process(new Processor() {
public void process(Exchange e) {
- log.debug("Received exchange: " + e.getIn());
+ log.debug("Received exchange: {}", e.getIn());
latch.countDown();
}
});
@@ -86,7 +86,7 @@ public class SedaRouteTest extends TestSupport {
from("seda:test.a").to("seda:test.b");
from("seda:test.b").process(new Processor() {
public void process(Exchange e) {
- log.debug("Received exchange: " + e.getIn());
+ log.debug("Received exchange: {}", e.getIn());
latch.countDown();
}
});
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorEndpointClearCachedSchemaTest.java b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorEndpointClearCachedSchemaTest.java
index 77392709e41..506b2bc6111 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorEndpointClearCachedSchemaTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorEndpointClearCachedSchemaTest.java
@@ -137,7 +137,7 @@ public class ValidatorEndpointClearCachedSchemaTest extends ContextTestSupport {
}
Collection<Endpoint> endpoints = context.getEndpoints();
for (Endpoint endpoint : endpoints) {
- LOG.info("Endpoint URI: " + endpoint.getEndpointUri());
+ LOG.info("Endpoint URI: {}", endpoint.getEndpointUri());
if (endpoint.getEndpointUri().startsWith("validator:")) {
ValidatorEndpoint xsltEndpoint = (ValidatorEndpoint) endpoint;
xsltEndpoint.clearCachedSchema();
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
index cbee5406232..48e8a342d5c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
@@ -72,7 +72,7 @@ public class ConverterTest extends TestSupport {
byte[] array = converter.convertTo(byte[].class, "foo");
assertNotNull(array);
- LOG.debug("Found array of size: " + array.length);
+ LOG.debug("Found array of size: {}", array.length);
String text = converter.convertTo(String.class, array);
assertEquals("foo", text, "Converted to String");
@@ -83,7 +83,7 @@ public class ConverterTest extends TestSupport {
char[] array = converter.convertTo(char[].class, "foo");
assertNotNull(array);
- LOG.debug("Found array of size: " + array.length);
+ LOG.debug("Found array of size: {}", array.length);
String text = converter.convertTo(String.class, array);
assertEquals("foo", text, "Converted to String");
@@ -146,7 +146,7 @@ public class ConverterTest extends TestSupport {
// now lets go back to a List again
List<?> resultList = converter.convertTo(List.class, intArray);
assertEquals(2, resultList.size(), "List size");
- LOG.debug("From primitive type array we've created the list: " + resultList);
+ LOG.debug("From primitive type array we've created the list: {}", resultList);
}
@Test
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
index 83b85a3137e..4e8dfd77628 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
@@ -54,7 +54,7 @@ public class JaxpTest {
= converter.convertTo(Document.class, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><hello>world!</hello>");
assertNotNull(document);
- LOG.debug("Found document: " + document);
+ LOG.debug("Found document: {}", document);
// lets now convert back again
@@ -69,7 +69,7 @@ public class JaxpTest {
Source source = converter.convertTo(Source.class, "<hello>world!</hello>");
assertNotNull(source);
- LOG.debug("Found document: " + source);
+ LOG.debug("Found document: {}", source);
}
@Test
@@ -78,7 +78,7 @@ public class JaxpTest {
DOMSource domSource = converter.convertTo(DOMSource.class, streamSource);
assertNotNull(domSource, "Could not convert to a DOMSource!");
- LOG.debug("Found document: " + domSource);
+ LOG.debug("Found document: {}", domSource);
}
@Test
@@ -88,7 +88,7 @@ public class JaxpTest {
Source source = converter.convertTo(DOMSource.class, element);
assertNotNull(source, "Could not convert from Node to Source!");
- LOG.debug("Found source: " + source);
+ LOG.debug("Found source: {}", source);
InputStream in = converter.convertTo(InputStream.class, source);
assertNotNull(in, "Could not convert from Source to InputStream!");
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/PrimitiveTypeConverterIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/PrimitiveTypeConverterIssueTest.java
index ca68cae8662..07a8253c18b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/PrimitiveTypeConverterIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/PrimitiveTypeConverterIssueTest.java
@@ -31,6 +31,6 @@ public class PrimitiveTypeConverterIssueTest extends ContextTestSupport {
int num = context.getTypeConverter().convertTo(int.class, "123");
assertEquals(123, num);
}
- log.info("Time taken: " + watch.taken());
+ log.info("Time taken: {}", watch.taken());
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/PropertyEditorTypeConverterIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/PropertyEditorTypeConverterIssueTest.java
index cdea2518859..e67e108d51d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/PropertyEditorTypeConverterIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/PropertyEditorTypeConverterIssueTest.java
@@ -40,6 +40,6 @@ public class PropertyEditorTypeConverterIssueTest extends ContextTestSupport {
log.debug(s);
assertNotNull(s);
}
- log.info("Time taken: " + watch.taken());
+ log.info("Time taken: {}", watch.taken());
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/ClassicUuidGeneratorTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/ClassicUuidGeneratorTest.java
index d2f7358eb20..1589efc44c0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/ClassicUuidGeneratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/ClassicUuidGeneratorTest.java
@@ -45,13 +45,13 @@ public class ClassicUuidGeneratorTest {
ClassicUuidGenerator uuidGenerator = new ClassicUuidGenerator();
StopWatch watch = new StopWatch();
- LOG.info("First id: " + uuidGenerator.generateUuid());
+ LOG.info("First id: {}", uuidGenerator.generateUuid());
for (int i = 0; i < 500000; i++) {
uuidGenerator.generateUuid();
}
- LOG.info("Last id: " + uuidGenerator.generateUuid());
+ LOG.info("Last id: {}", uuidGenerator.generateUuid());
- LOG.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ LOG.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
}
@Test
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultUuidGeneratorTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultUuidGeneratorTest.java
index 7dfd44ebb74..78a314cd8dc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultUuidGeneratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultUuidGeneratorTest.java
@@ -44,13 +44,13 @@ public class DefaultUuidGeneratorTest {
UuidGenerator uuidGenerator = new DefaultUuidGenerator();
StopWatch watch = new StopWatch();
- LOG.info("First id: " + uuidGenerator.generateUuid());
+ LOG.info("First id: {}", uuidGenerator.generateUuid());
for (int i = 0; i < 500000; i++) {
uuidGenerator.generateUuid();
}
- LOG.info("Last id: " + uuidGenerator.generateUuid());
+ LOG.info("Last id: {}", uuidGenerator.generateUuid());
- LOG.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ LOG.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/ShortUuidGeneratorTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/ShortUuidGeneratorTest.java
index 16db1a46459..e27dcd2fcda 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/ShortUuidGeneratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/ShortUuidGeneratorTest.java
@@ -44,13 +44,13 @@ public class ShortUuidGeneratorTest {
UuidGenerator uuidGenerator = new ShortUuidGenerator();
StopWatch watch = new StopWatch();
- LOG.info("First id: " + uuidGenerator.generateUuid());
+ LOG.info("First id: {}", uuidGenerator.generateUuid());
for (int i = 0; i < 500000; i++) {
uuidGenerator.generateUuid();
}
- LOG.info("Last id: " + uuidGenerator.generateUuid());
+ LOG.info("Last id: {}", uuidGenerator.generateUuid());
- LOG.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ LOG.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/SimpleUuidGeneratorTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/SimpleUuidGeneratorTest.java
index 57ad53376c0..380204d0998 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/SimpleUuidGeneratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/SimpleUuidGeneratorTest.java
@@ -42,13 +42,13 @@ public class SimpleUuidGeneratorTest {
SimpleUuidGenerator uuidGenerator = new SimpleUuidGenerator();
StopWatch watch = new StopWatch();
- LOG.info("First id: " + uuidGenerator.generateUuid());
+ LOG.info("First id: {}", uuidGenerator.generateUuid());
for (int i = 0; i < 500000; i++) {
uuidGenerator.generateUuid();
}
- LOG.info("Last id: " + uuidGenerator.generateUuid());
+ LOG.info("Last id: {}", uuidGenerator.generateUuid());
- LOG.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ LOG.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryPerformanceTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryPerformanceTest.java
index f20c85edf8c..525e6a48eca 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryPerformanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryPerformanceTest.java
@@ -68,7 +68,7 @@ public class TypeConverterRegistryPerformanceTest extends ContextTestSupport {
}
assertTrue(latch.await(2, TimeUnit.MINUTES), "Should all work");
- log.info("Took " + watch.taken());
+ log.info("Took {}", watch.taken());
executorService.shutdownNow();
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/VanillaUuidGeneratorTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/VanillaUuidGeneratorTest.java
index 5eef32ca438..cbad0b25322 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/VanillaUuidGeneratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/VanillaUuidGeneratorTest.java
@@ -44,13 +44,13 @@ public class VanillaUuidGeneratorTest {
UuidGenerator uuidGenerator = new VanillaUuidGenerator();
StopWatch watch = new StopWatch();
- LOG.info("First id: " + uuidGenerator.generateUuid());
+ LOG.info("First id: {}", uuidGenerator.generateUuid());
for (int i = 0; i < 500000; i++) {
uuidGenerator.generateUuid();
}
- LOG.info("Last id: " + uuidGenerator.generateUuid());
+ LOG.info("Last id: {}", uuidGenerator.generateUuid());
- LOG.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ LOG.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
index 7de915d0eb3..8197969e0cf 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
@@ -86,7 +86,7 @@ public class EventNotifierExchangeCompletedTest extends ContextTestSupport {
long elapsed = now.getTime() - created;
assertTrue(elapsed > 400, "Should be > 400, was: " + elapsed);
- log.info("Elapsed time in millis: " + elapsed);
+ log.info("Elapsed time in millis: {}", elapsed);
}
@Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
index 6acd13dbe79..40405d1f7f6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
@@ -81,7 +81,7 @@ public class AdviceWithStartTargetIssueTest extends ContextTestSupport {
public void process(Exchange exchange) throws Exception {
// we just count number of interceptions
count++;
- LOG.info("I am the container wide interceptor. Intercepted total count: " + count);
+ LOG.info("I am the container wide interceptor. Intercepted total count: {}", count);
target.process(exchange);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/DavidSiefertTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/DavidSiefertTest.java
index 39eae8ea064..5e31d9d3f2f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/DavidSiefertTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/DavidSiefertTest.java
@@ -48,7 +48,7 @@ public class DavidSiefertTest extends ContextTestSupport {
result.assertIsSatisfied();
fail("Should have failed this test!");
} catch (AssertionError e) {
- log.info("Caught expected assertion failure: " + e, e);
+ log.info("Caught expected assertion failure: {}", e, e);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java
index 39b908c7671..9a1ee749b19 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java
@@ -63,14 +63,14 @@ public class RomeksExceptionTest extends ContextTestSupport {
List<Exchange> list = exceptionEndpoint.getReceivedExchanges();
Exchange exchange = list.get(0);
- LOG.debug("Received: " + exchange.getIn());
+ LOG.debug("Received: {}", exchange.getIn());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
final Processor exceptionThrower = new Processor() {
public void process(Exchange exchange) throws Exception {
- LOG.debug("About to throw exception on " + exchange);
+ LOG.debug("About to throw exception on {}", exchange);
exchange.getIn().setBody("<exception/>");
throw new IllegalArgumentException("Exception thrown intentionally.");
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
index 251f6877d3e..50c337c1ab0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
@@ -69,13 +69,13 @@ public class SetHeaderInDoCatchIssueTest extends ContextTestSupport {
registry.bind("A", new Processor() {
public void process(Exchange exchange) throws Exception {
- log.info("A headers " + exchange.getIn().getHeaders());
+ log.info("A headers {}", exchange.getIn().getHeaders());
}
});
registry.bind("B", new Processor() {
public void process(Exchange exchange) throws Exception {
- log.info("B headers " + exchange.getIn().getHeaders());
+ log.info("B headers {}", exchange.getIn().getHeaders());
if ("ExchangeTimedOutException".equals(exchange.getIn().getBody(String.class))) {
throw new ExchangeTimedOutException(exchange, 1);
@@ -87,7 +87,7 @@ public class SetHeaderInDoCatchIssueTest extends ContextTestSupport {
registry.bind("C", new Processor() {
public void process(Exchange exchange) throws Exception {
- log.info("C headers " + exchange.getIn().getHeaders());
+ log.info("C headers {}", exchange.getIn().getHeaders());
}
});
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterParallelIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterParallelIssueTest.java
index fb9562d87ab..e07ab5f17f0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterParallelIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterParallelIssueTest.java
@@ -62,7 +62,7 @@ public class SplitterParallelIssueTest extends ContextTestSupport {
public void process(Exchange exchange) throws Exception {
int num = exchange.getIn().getBody(int.class);
final long sleep = num * delay;
- log.info("Sleep for " + sleep + "ms");
+ log.info("Sleep for {} ms", sleep);
Thread.sleep(sleep);
}
}).end().log("End ${body}").to("mock:end");
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceManualTest.java b/core/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceManualTest.java
index 99070007c7a..5d66ed5b8b3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/TokenPairIteratorSplitChoicePerformanceManualTest.java
@@ -63,10 +63,10 @@ public class TokenPairIteratorSplitChoicePerformanceManualTest extends ContextTe
boolean matches = notify.matches(5, TimeUnit.MINUTES);
log.info("Processed file with {} elements in: {}", size, TimeUtils.printDuration(watch.taken(), true));
- log.info("Processed " + tiny.get() + " tiny messages");
- log.info("Processed " + small.get() + " small messages");
- log.info("Processed " + med.get() + " medium messages");
- log.info("Processed " + large.get() + " large messages");
+ log.info("Processed {} tiny messages", tiny.get());
+ log.info("Processed {} small messages", small.get());
+ log.info("Processed {} medium messages", med.get());
+ log.info("Processed {} large messages", large.get());
assertEquals((size / 10) * 4, tiny.get());
assertEquals((size / 10) * 2, small.get());
@@ -94,7 +94,7 @@ public class TokenPairIteratorSplitChoicePerformanceManualTest extends ContextTe
int num = tiny.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " tiny messages");
+ log.info("Processed {} tiny messages", num);
log.debug(xml);
}
}
@@ -116,7 +116,7 @@ public class TokenPairIteratorSplitChoicePerformanceManualTest extends ContextTe
int num = med.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " medium messages");
+ log.info("Processed {} medium messages", num);
log.debug(xml);
}
}
@@ -127,7 +127,7 @@ public class TokenPairIteratorSplitChoicePerformanceManualTest extends ContextTe
int num = large.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " large messages");
+ log.info("Processed {} large messages", num);
log.debug(xml);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java b/core/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
index 9ff4bdf3969..e71298e9cc3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/XPathRouteConcurrentBigTest.java
@@ -45,7 +45,7 @@ public class XPathRouteConcurrentBigTest extends ContextTestSupport {
}
private void doSendMessages(int messageCount) throws Exception {
- LOG.info("Sending " + messageCount + " messages");
+ LOG.info("Sending {} messages", messageCount);
int forResult = (messageCount * 2 / 3) + messageCount % 3;
int forOther = messageCount - forResult;
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceManualTest.java b/core/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceManualTest.java
index 6202b7f9529..d02482ec381 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/XPathSplitChoicePerformanceManualTest.java
@@ -63,10 +63,10 @@ public class XPathSplitChoicePerformanceManualTest extends ContextTestSupport {
boolean matches = notify.matches(60, TimeUnit.SECONDS);
log.info("Processed file with {} elements in: {}", size, TimeUtils.printDuration(watch.taken(), true));
- log.info("Processed " + tiny.get() + " tiny messages");
- log.info("Processed " + small.get() + " small messages");
- log.info("Processed " + med.get() + " medium messages");
- log.info("Processed " + large.get() + " large messages");
+ log.info("Processed {} tiny messages", tiny.get());
+ log.info("Processed {} small messages", small.get());
+ log.info("Processed {} medium messages", med.get());
+ log.info("Processed {} large messages", large.get());
assertEquals((size / 10) * 4, tiny.get());
assertEquals((size / 10) * 2, small.get());
@@ -94,7 +94,7 @@ public class XPathSplitChoicePerformanceManualTest extends ContextTestSupport {
int num = tiny.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " tiny messages");
+ log.info("Processed {} tiny messages", num);
log.debug(xml);
}
}
@@ -105,7 +105,7 @@ public class XPathSplitChoicePerformanceManualTest extends ContextTestSupport {
int num = small.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " small messages");
+ log.info("Processed {} small messages", num);
log.debug(xml);
}
}
@@ -116,7 +116,7 @@ public class XPathSplitChoicePerformanceManualTest extends ContextTestSupport {
int num = med.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " medium messages");
+ log.info("Processed {} medium messages", num);
log.debug(xml);
}
}
@@ -127,7 +127,7 @@ public class XPathSplitChoicePerformanceManualTest extends ContextTestSupport {
int num = large.incrementAndGet();
if (num % 100 == 0) {
- log.info("Processed " + num + " large messages");
+ log.info("Processed {} large messages", num);
log.debug(xml);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmFromCamelContextTest.java b/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmFromCamelContextTest.java
index ccad9ceffb8..14c746f3bb8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmFromCamelContextTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmFromCamelContextTest.java
@@ -36,7 +36,7 @@ public class GenerateXmFromCamelContextTest extends ContextTestSupport {
assertEquals(1, list.size(), "Size of list " + list);
RouteDefinition routeType = list.get(0);
- log.info("Found route: " + routeType);
+ log.info("Found route: {}", routeType);
// now lets marshall it!
dump(routeType);
@@ -48,7 +48,7 @@ public class GenerateXmFromCamelContextTest extends ContextTestSupport {
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
StringWriter buffer = new StringWriter();
marshaller.marshal(object, buffer);
- log.info("Created: " + buffer);
+ log.info("Created: {}", buffer);
assertNotNull(buffer);
String out = buffer.toString();
assertTrue(out.indexOf("<from uri=\"direct:start\"/>") > 0, "Should contain the description");
diff --git a/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmlTest.java b/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmlTest.java
index 785c0b8a7ea..802279a268e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmlTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/model/GenerateXmlTest.java
@@ -57,7 +57,7 @@ public class GenerateXmlTest extends XmlTestSupport {
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
StringWriter buffer = new StringWriter();
marshaller.marshal(context, buffer);
- log.info("Created: " + buffer);
+ log.info("Created: {}", buffer);
assertNotNull(buffer);
String out = buffer.toString();
assertTrue(out.indexOf("This is a description of the route") > 0, "Should contain the description");
diff --git a/core/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java b/core/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
index cfaea59a5f9..53d6372e986 100644
--- a/core/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
@@ -38,14 +38,14 @@ public abstract class XmlTestSupport extends TestSupport {
protected RouteContainer assertParseAsJaxb(String uri) throws JAXBException {
Object value = parseUri(uri);
RouteContainer context = assertIsInstanceOf(RouteContainer.class, value);
- log.info("Found: " + context);
+ log.info("Found: {}", context);
return context;
}
protected RestContainer assertParseRestAsJaxb(String uri) throws JAXBException {
Object value = parseUri(uri);
RestContainer context = assertIsInstanceOf(RestContainer.class, value);
- log.info("Found: " + context);
+ log.info("Found: {}", context);
return context;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
index c37a2d7a593..883ffff661d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
@@ -109,7 +109,7 @@ public class BeanOgnMethodWithXPathInjectionTest extends ContextTestSupport {
public String read(String body, @XPath("/soap:Envelope/soap:Body/foo/text()") String foo) {
this.foo = foo;
this.body = body;
- LOG.info("read() method called on " + this);
+ LOG.info("read() method called on {}", this);
return foo;
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
index bb15636bb7d..6f3c0021377 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
@@ -108,7 +108,7 @@ public class BeanWithExceptionTest extends ContextTestSupport {
assertEquals("old", cheese);
if ("bar".equals(header)) {
- LOG.info("someMethod() called with valid header and body: " + body);
+ LOG.info("someMethod() called with valid header and body: {}", body);
} else {
throw new ValidationException(null, "Invalid header foo: " + header);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
index 00586f3ee70..37139d752be 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
@@ -91,7 +91,7 @@ public class BeanWithXPathInjectionPreCompileTest extends ContextTestSupport {
public void read(String body, @XPath(value = "/soap:Envelope/soap:Body/foo/text()", preCompile = false) String foo) {
this.foo = foo;
this.body = body;
- LOG.info("read() method called on " + this);
+ LOG.info("read() method called on {}", this);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
index a996a5f0ebf..95282d63640 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
@@ -91,7 +91,7 @@ public class BeanWithXPathInjectionTest extends ContextTestSupport {
public void read(String body, @XPath("/soap:Envelope/soap:Body/foo/text()") String foo) {
this.foo = foo;
this.body = body;
- LOG.info("read() method called on " + this);
+ LOG.info("read() method called on {}", this);
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/CreateRouteWithNonExistingEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/CreateRouteWithNonExistingEndpointTest.java
index dc763a7d4fd..cb44ca100c6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/CreateRouteWithNonExistingEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/CreateRouteWithNonExistingEndpointTest.java
@@ -38,7 +38,7 @@ public class CreateRouteWithNonExistingEndpointTest extends ContextTestSupport {
super.setUp();
fail("Should have failed to create this route!");
} catch (Exception e) {
- log.debug("Caught expected exception: " + e, e);
+ log.debug("Caught expected exception: {}", e.getMessage(), e);
NoSuchEndpointException nse = assertIsInstanceOf(NoSuchEndpointException.class, e.getCause());
assertEquals("thisUriDoesNotExist", nse.getUri(), "uri");
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryPolicyPerExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryPolicyPerExceptionTest.java
index deef79435bd..3e7d327d03d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryPolicyPerExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryPolicyPerExceptionTest.java
@@ -46,7 +46,7 @@ public class RedeliveryPolicyPerExceptionTest extends ContextTestSupport {
assertTrue(b1, "List should not be empty!");
Exchange exchange = list.get(0);
Message in = exchange.getIn();
- log.info("Found message with headers: " + in.getHeaders());
+ log.info("Found message with headers: {}", in.getHeaders());
assertMessageHeader(in, Exchange.REDELIVERY_COUNTER, 2);
assertMessageHeader(in, Exchange.REDELIVERY_MAX_COUNTER, 2);
@@ -66,7 +66,7 @@ public class RedeliveryPolicyPerExceptionTest extends ContextTestSupport {
assertTrue(b1, "List should not be empty!");
Exchange exchange = list.get(0);
Message in = exchange.getIn();
- log.info("Found message with headers: " + in.getHeaders());
+ log.info("Found message with headers: {}", in.getHeaders());
assertMessageHeader(in, Exchange.REDELIVERY_COUNTER, 0);
assertMessageHeader(in, Exchange.REDELIVERY_MAX_COUNTER, null);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SendToNonExistingEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SendToNonExistingEndpointTest.java
index 3e74f6d2633..e6ed4a95338 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SendToNonExistingEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SendToNonExistingEndpointTest.java
@@ -31,7 +31,7 @@ public class SendToNonExistingEndpointTest extends ContextTestSupport {
template.sendBody("thisUriDoesNotExist", "<hello>world!</hello>");
fail("Should have failed to send this message!");
} catch (NoSuchEndpointException e) {
- log.debug("Caught expected exception: " + e, e);
+ log.debug("Caught expected exception: {}", e.getMessage(), e);
assertEquals("thisUriDoesNotExist", e.getUri(), "uri");
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
index 16d3e5fecc1..db813623eac 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
@@ -42,7 +42,7 @@ public class SplitAggregateInOutTest extends ContextTestSupport {
// use requestBody as its InOut
Object out = template.requestBody("direct:start", "A@B@C");
assertEquals(expectedBody, out);
- LOG.debug("Response to caller: " + out);
+ LOG.debug("Response to caller: {}", out);
assertMockEndpointsSatisfied();
}
@@ -97,7 +97,7 @@ public class SplitAggregateInOutTest extends ContextTestSupport {
* We just handle the order by returning a id line for the order
*/
public String handleOrder(String line) {
- LOG.debug("HandleOrder: " + line);
+ LOG.debug("HandleOrder: {}", line);
return "(id=" + ++counter + ",item=" + line + ")";
}
@@ -105,7 +105,7 @@ public class SplitAggregateInOutTest extends ContextTestSupport {
* We use the same bean for building the combined response to send back to the original caller
*/
public String buildCombinedResponse(String line) {
- LOG.debug("BuildCombinedResponse: " + line);
+ LOG.debug("BuildCombinedResponse: {}", line);
return "Response[" + line + "]";
}
}
@@ -133,8 +133,8 @@ public class SplitAggregateInOutTest extends ContextTestSupport {
String orders = oldExchange.getIn().getBody(String.class);
String newLine = newExchange.getIn().getBody(String.class);
- LOG.debug("Aggregate old orders: " + orders);
- LOG.debug("Aggregate new order: " + newLine);
+ LOG.debug("Aggregate old orders: {}", orders);
+ LOG.debug("Aggregate new order: {}", newLine);
// put orders together separating by semi colon
orders = orders + ";" + newLine;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileManualTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileManualTest.java
index 652fef2af40..5ec19711ce9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileManualTest.java
@@ -51,7 +51,7 @@ public class SplitterParallelBigFileManualTest extends ContextTestSupport {
NotifyBuilder builder = new NotifyBuilder(context).whenDone(lines + 1).create();
boolean done = builder.matches(120, TimeUnit.SECONDS);
- log.info("Took " + TimeUtils.printDuration(watch.taken(), true));
+ log.info("Took {}", TimeUtils.printDuration(watch.taken(), true));
if (!done) {
throw new CamelException("Could not split file in 2 minutes");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java
index e7ffbb5f1d1..e42e73ddd69 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingUoWIssueTest.java
@@ -57,7 +57,7 @@ public class SplitterStreamingUoWIssueTest extends ContextTestSupport {
.autoStartup(false)
.log("Start of file ${file:name}")
.split(body().tokenize(",")).streaming().process(e -> {
- log.info("Stackframe size: " + Thread.currentThread().getStackTrace().length);
+ log.info("Stackframe size: {}", Thread.currentThread().getStackTrace().length);
}).to("seda:queue").end()
.log("End of file ${file:name}").to("mock:result");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java
index 609571f1ce1..2909fee5c3e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java
@@ -52,7 +52,7 @@ public class SplitterWithXqureyTest extends ContextTestSupport {
assertMockEndpointsSatisfied();
for (Exchange exchange : result.getExchanges()) {
String message = exchange.getIn().getBody(String.class);
- log.debug("The message is " + message);
+ log.debug("The message is {}", message);
assertEquals(0, message.indexOf("<other"), "The split message should start with <other");
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerSedaTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerSedaTest.java
index 8440d9acdbf..da99ff447c2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerSedaTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerSedaTest.java
@@ -129,7 +129,7 @@ public class ThrottlingExceptionRoutePolicyHalfOpenHandlerSedaTest extends Conte
try {
template.sendBody(url, bodyText);
} catch (Exception e) {
- log.debug("Error sending:" + e.getCause().getMessage());
+ log.debug("Error sending: {}", e.getCause().getMessage());
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
index 50d065b0a9c..1e3e3ded583 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenHandlerTest.java
@@ -130,7 +130,7 @@ public class ThrottlingExceptionRoutePolicyHalfOpenHandlerTest extends ContextTe
try {
template.sendBody(url, bodyText);
} catch (Exception e) {
- log.debug("Error sending:" + e.getCause().getMessage());
+ log.debug("Error sending: {}", e.getCause().getMessage());
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
index 0237280b6cd..02ab9e4635e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlingExceptionRoutePolicyHalfOpenTest.java
@@ -120,7 +120,7 @@ public class ThrottlingExceptionRoutePolicyHalfOpenTest extends ContextTestSuppo
try {
template.sendBody(url, bodyText);
} catch (Exception e) {
- log.debug("Error sending:" + e.getCause().getMessage());
+ log.debug("Error sending: {}", e.getCause().getMessage());
}
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
index 889e43f087d..86fb73235d7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
@@ -30,7 +30,7 @@ public class UnitOfWorkSynchronizationAdapterTest extends UnitOfWorkTest {
from("seda:async").to("direct:foo");
from("direct:foo").process(new Processor() {
public void process(Exchange exchange) throws Exception {
- log.info("Received: " + exchange);
+ log.info("Received: {}", exchange);
exchange.getUnitOfWork().addSynchronization(new SynchronizationAdapter() {
@Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
index 33ee51e0595..0078e30a114 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
@@ -48,7 +48,7 @@ public class UnitOfWorkTest extends ContextTestSupport {
assertEquals("bar", foo, "Should have propagated the header inside the Synchronization.onComplete() callback");
assertNull(baz, "The Synchronization.onFailure() callback should have not been invoked");
- log.info("Received completed: " + completed);
+ log.info("Received completed: {}", completed);
}
@Test
@@ -61,7 +61,7 @@ public class UnitOfWorkTest extends ContextTestSupport {
assertEquals("bat", baz, "Should have propagated the header inside the Synchronization.onFailure() callback");
assertNull(foo, "The Synchronization.onComplete() callback should have not been invoked");
- log.info("Received fail: " + failed);
+ log.info("Received fail: {}", failed);
}
@Override
@@ -102,7 +102,7 @@ public class UnitOfWorkTest extends ContextTestSupport {
from("seda:async").to("direct:foo");
from("direct:foo").process(new Processor() {
public void process(Exchange exchange) throws Exception {
- log.info("Received: " + exchange);
+ log.info("Received: {}", exchange);
exchange.getUnitOfWork().addSynchronization(synchronization);
String name = getName();
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateNewExchangeAndConfirmTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateNewExchangeAndConfirmTest.java
index 8f2424a1083..8697174512d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateNewExchangeAndConfirmTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateNewExchangeAndConfirmTest.java
@@ -86,7 +86,7 @@ public class AggregateNewExchangeAndConfirmTest extends ContextTestSupport {
@Override
public void confirm(CamelContext camelContext, String exchangeId) {
- log.info("Confirmed id: " + exchangeId);
+ log.info("Confirmed id: {}", exchangeId);
this.id = exchangeId;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateSimpleExpressionIssueManualTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateSimpleExpressionIssueManualTest.java
index 184f498da63..3ff32954c3d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateSimpleExpressionIssueManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateSimpleExpressionIssueManualTest.java
@@ -49,7 +49,7 @@ public class AggregateSimpleExpressionIssueManualTest extends ContextTestSupport
int rows = 100000;
int batches = rows / 1000;
int total = files + (files * rows) + (files * batches);
- LOG.info("There are " + total + " exchanges");
+ LOG.info("There are {} exchanges", total);
NotifyBuilder notify = new NotifyBuilder(context).whenDone(total).create();
LOG.info("Writing 10 files with 100000 rows in each file");
@@ -68,9 +68,9 @@ public class AggregateSimpleExpressionIssueManualTest extends ContextTestSupport
LOG.info("Waiting to process all the files");
boolean matches = notify.matches(3, TimeUnit.MINUTES);
- LOG.info("Should process all files " + matches);
+ LOG.info("Should process all files {}", matches);
- LOG.info("Time taken " + watch.taken() + " ms");
+ LOG.info("Time taken {} ms", watch.taken());
}
@Override
@@ -90,7 +90,7 @@ public class AggregateSimpleExpressionIssueManualTest extends ContextTestSupport
private volatile int cnt;
public void invoke(final List<String> strList) {
- LOG.info("Batch " + (++cnt));
+ LOG.info("Batch {}", ++cnt);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
index ddaeafb6ac3..653ddc4e368 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
@@ -119,16 +119,16 @@ public class AlbertoAggregatorTest extends ContextTestSupport {
private void debugIn(String stringId, Exchange oldExchange, Exchange newExchange) {
if (oldExchange != null) {
- log.debug(stringId + " old headers in: " + oldExchange.getIn().getHeaders());
- log.debug(stringId + " old body in: " + oldExchange.getIn().getBody());
+ log.debug("{} old headers in: {}", stringId, oldExchange.getIn().getHeaders());
+ log.debug("{} old body in: {}", stringId, oldExchange.getIn().getBody());
}
- log.debug(stringId + " new headers in: " + newExchange.getIn().getHeaders());
- log.debug(stringId + " new body in: " + newExchange.getIn().getBody());
+ log.debug("{} new headers in: {}", stringId, newExchange.getIn().getHeaders());
+ log.debug("{} new body in: {}", stringId, newExchange.getIn().getBody());
}
private void debugOut(String stringId, Exchange exchange) {
- log.debug(stringId + " old headers out: " + exchange.getIn().getHeaders());
- log.debug(stringId + " old body out: " + exchange.getIn().getBody());
+ log.debug("{} old headers out: {}", stringId, exchange.getIn().getHeaders());
+ log.debug("{} old body out: {}", stringId, exchange.getIn().getBody());
}
@Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
index 6d30f383629..bbbb3472cd8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
@@ -50,7 +50,7 @@ public class AsyncEndpointEventNotifierTest extends ContextTestSupport {
assertTrue(latch.await(10, TimeUnit.SECONDS), "Should count down");
long delta = time.get();
- log.info("ExchangeEventSent took ms: " + delta);
+ log.info("ExchangeEventSent took ms: {}", delta);
assertTrue(delta > 200, "Should take about 250 millis sec, was: " + delta);
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java
index 6f552d54565..f81407308a6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/MyAsyncProducer.java
@@ -48,18 +48,18 @@ public class MyAsyncProducer extends DefaultAsyncProducer {
executor.submit(new Callable<Object>() {
public Object call() throws Exception {
- LOG.info("Simulating a task which takes " + getEndpoint().getDelay() + " millis to reply");
+ LOG.info("Simulating a task which takes {} millis to reply", getEndpoint().getDelay());
Thread.sleep(getEndpoint().getDelay());
int count = counter.incrementAndGet();
if (getEndpoint().getFailFirstAttempts() >= count) {
- LOG.info("Simulating a failure at attempt " + count);
+ LOG.info("Simulating a failure at attempt {}", count);
exchange.setException(new CamelExchangeException("Simulated error at attempt " + count, exchange));
} else {
String reply = getEndpoint().getReply();
reply = getEndpoint().isAppend() ? exchange.getIn().getBody() + " " + reply : reply;
exchange.getMessage().setBody(reply);
- LOG.info("Setting reply " + reply);
+ LOG.info("Setting reply {}", reply);
}
LOG.info("Callback done(false)");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/resequencer/ResequencerEngineTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/resequencer/ResequencerEngineTest.java
index 2efd0f3d37f..d1fd0efe6f9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/resequencer/ResequencerEngineTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/resequencer/ResequencerEngineTest.java
@@ -119,7 +119,7 @@ class ResequencerEngineTest extends TestSupport {
}
millis = System.currentTimeMillis() - millis;
log.info(sb.toString());
- log.info("Duration = " + millis + " ms");
+ log.info("Duration = {} ms", millis);
}
@DisabledIf(value = "isIgnoreLoadTests",