Repository: camel
Updated Branches:
  refs/heads/master 83638128b -> e15c96556


Fix sporadic test failures in camel-ssh and camel-ftp

In certain environments (in particular cloud environments), the unit
tests for camel-ssh and camel-ftp may quickly exhaust the Linux entropy
pool, causing slow test execution and sporadic failures. To solve this,
use /dev/urandom instead of /dev/random.

This problem has been observed on Google Compute Engine.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e15c9655
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e15c9655
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e15c9655

Branch: refs/heads/master
Commit: e15c96556ec5dbf4c50777a276dd186dcb3bd278
Parents: b3196ee
Author: Andreas Veithen <veit...@google.com>
Authored: Mon Jan 11 19:28:57 2016 +0000
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Jan 15 08:31:02 2016 +0100

----------------------------------------------------------------------
 parent/pom.xml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e15c9655/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index d52ba1f..e68187a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -3318,5 +3318,31 @@
         </plugins>
       </build>
     </profile>
+
+    <profile>
+      <activation>
+        <os>
+          <family>Linux</family>
+        </os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <systemPropertyVariables>
+                <!-- By default Java's secure RNG uses /dev/random to generate 
seeds. In
+                     certain environments (in particular cloud environments), 
some unit
+                     tests may exhaust the Linux entropy pool and start 
blocking on reads
+                     from /dev/random. To avoid this, force Java to always use 
/dev/urandom.
+                     Note that "file:/dev/urandom" doesn't work here because 
it is interpreted
+                     in a special way. Use either "file:///dev/urandom" or 
"file:/dev/./urandom". -->
+                <java.security.egd>file:///dev/urandom</java.security.egd>
+              </systemPropertyVariables>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>

Reply via email to