You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2016/03/01 22:32:11 UTC

svn commit: r1733158 - in /jmeter/trunk: .travis.yml src/core/org/apache/jmeter/util/JMeterUtils.java

Author: fschumacher
Date: Tue Mar  1 21:32:11 2016
New Revision: 1733158

URL: http://svn.apache.org/viewvc?rev=1733158&view=rev
Log:
Try to add a ipv4 entry for the local hostname before tests in travis and
give more information, when tests fail while getting localhost.

Modified:
    jmeter/trunk/.travis.yml
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java

Modified: jmeter/trunk/.travis.yml
URL: http://svn.apache.org/viewvc/jmeter/trunk/.travis.yml?rev=1733158&r1=1733157&r2=1733158&view=diff
==============================================================================
--- jmeter/trunk/.travis.yml (original)
+++ jmeter/trunk/.travis.yml Tue Mar  1 21:32:11 2016
@@ -1,5 +1,6 @@
 language: java
-install: ant download_jars install
+install: ant download_jars install; cat /etc/hosts
+before_script: echo "127.0.0.1 "`hostname` | sudo tee /etc/hosts
 script: ant -Djava.awt.headless=true test
 jdk:
   - openjdk7

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1733158&r1=1733157&r2=1733158&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Tue Mar  1 21:32:11 2016
@@ -1270,7 +1270,7 @@ public class JMeterUtils implements Unit
         try {
             localHost = InetAddress.getLocalHost();
         } catch (UnknownHostException e1) {
-            log.error("Unable to get local host IP address.");
+            log.error("Unable to get local host IP address.", e1);
             return; // TODO - perhaps this should be a fatal error?
         }
         localHostIP=localHost.getHostAddress();