ACCUMULO-3638 only warn if the system property is set

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

Branch: refs/heads/master
Commit: 775cdb1b9881b1ea9ad5ef1b22ace819fee1102f
Parents: ae581d2
Author: Eric C. Newton <eric.new...@gmail.com>
Authored: Wed Mar 4 10:31:35 2015 -0500
Committer: Eric C. Newton <eric.new...@gmail.com>
Committed: Wed Mar 4 10:31:35 2015 -0500

----------------------------------------------------------------------
 test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775cdb1b/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java 
b/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java
index 41204da..e7c8c2d 100644
--- a/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java
+++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java
@@ -82,7 +82,10 @@ public class AccumuloIT {
   public Timeout testsShouldTimeout() {
     int waitLonger = 0;
     try {
-      waitLonger = Integer.parseInt(System.getProperty("timeout.factor"));
+      String timeoutString = System.getProperty("timeout.factor");
+      if (timeoutString != null && !timeoutString.isEmpty()) {
+        waitLonger = Integer.parseInt(timeoutString);
+      }
     } catch (NumberFormatException exception) {
       log.warn("Could not parse timeout.factor, defaulting to no timeout.");
     }

Reply via email to