You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/15 05:54:19 UTC

[camel] branch master updated: Fixed CS

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 22d0637  Fixed CS
22d0637 is described below

commit 22d0637ed3163678cf36dd8aaf59588d6d9199e4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 15 07:53:51 2020 +0200

    Fixed CS
---
 .../MulticastParallelTimeoutStreamCachingTest.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/MulticastParallelTimeoutStreamCachingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/MulticastParallelTimeoutStreamCachingTest.java
index ce9aac7..e0e216f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MulticastParallelTimeoutStreamCachingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MulticastParallelTimeoutStreamCachingTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -39,8 +39,8 @@ public class MulticastParallelTimeoutStreamCachingTest extends ContextTestSuppor
 
     private static final String TARGET_MULTICAST_PARALLEL_TIMEOUT_STREAM_CACHING_TEST_CACHE
             = "target/MulticastParallelTimeoutStreamCachingTestCache";
-    private static final String bodyString = "message body";
-    private static final byte[] BODY = bodyString.getBytes(StandardCharsets.UTF_8);
+    private static final String BODY_STRING = "message body";
+    private static final byte[] BODY = BODY_STRING.getBytes(StandardCharsets.UTF_8);
 
     @BeforeEach
     public void setUp() throws Exception {
@@ -62,14 +62,14 @@ public class MulticastParallelTimeoutStreamCachingTest extends ContextTestSuppor
 
     @Test
     public void testSendingAMessageUsingMulticastConvertsToReReadable() throws Exception {
-        getMockEndpoint("mock:x").expectedBodiesReceived(bodyString);
+        getMockEndpoint("mock:x").expectedBodiesReceived(BODY_STRING);
 
         template.sendBody("direct:a", "testMessage");
         assertMockEndpointsSatisfied();
 
         File f = new File(TARGET_MULTICAST_PARALLEL_TIMEOUT_STREAM_CACHING_TEST_CACHE);
         assertTrue(f.isDirectory());
-        Thread.sleep(500l); // deletion happens asynchron
+        Thread.sleep(500L); // deletion happens asynchron
         File[] files = f.listFiles();
         assertEquals(0, files.length);
     }
@@ -80,7 +80,7 @@ public class MulticastParallelTimeoutStreamCachingTest extends ContextTestSuppor
             public void process(Exchange exchange) {
                 try {
                     // sleep for one second so that the stream cache is built after the main exchange has finished due to timeout on the multicast
-                    Thread.sleep(1000l);
+                    Thread.sleep(1000L);
                 } catch (InterruptedException e) {
                     throw new IllegalStateException("Unexpected exception", e);
                 }
@@ -99,10 +99,10 @@ public class MulticastParallelTimeoutStreamCachingTest extends ContextTestSuppor
                         .setSpoolDirectory(TARGET_MULTICAST_PARALLEL_TIMEOUT_STREAM_CACHING_TEST_CACHE);
                 context.getStreamCachingStrategy().setEnabled(true);
                 context.getStreamCachingStrategy().setRemoveSpoolDirectoryWhenStopping(false);
-                context.getStreamCachingStrategy().setSpoolThreshold(1l);
+                context.getStreamCachingStrategy().setSpoolThreshold(1L);
                 context.setStreamCaching(true);
 
-                from("direct:a").multicast().timeout(500l).parallelProcessing().to("direct:x");
+                from("direct:a").multicast().timeout(500L).parallelProcessing().to("direct:x");
 
                 from("direct:x").process(processor1).to("mock:x");
             }