You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2017/02/23 18:30:16 UTC
svn commit: r1784187 -
/jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java
Author: sebb
Date: Thu Feb 23 18:30:15 2017
New Revision: 1784187
URL: http://svn.apache.org/viewvc?rev=1784187&view=rev
Log:
Try to debug jmeter-nightly Jenkins failures
Added:
jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java (with props)
Added: jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java?rev=1784187&view=auto
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java (added)
+++ jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java Thu Feb 23 18:30:15 2017
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.engine;
+
+import java.net.InetAddress;
+
+import org.junit.Test;
+
+/**
+ * Try to establish why some batchtestserver runs fail
+ */
+public class LocalHostTest {
+
+ private static void perr(Object s) {
+ System.err.println(s);
+ }
+
+ @Test
+ public void testLocalHost() throws Exception {
+ final String key = "java.rmi.server.hostname";
+ String host = System.getProperties().getProperty(key); // $NON-NLS-1$
+ perr(key + "=" + host);
+ InetAddress localHost;
+ if( host==null ) {
+ localHost = InetAddress.getLocalHost();
+ } else {
+ localHost = InetAddress.getByName(host);
+ }
+ perr(localHost);
+ perr("isSiteLocalAddress:"+localHost.isSiteLocalAddress());
+ perr("isAnyLocalAddress:"+localHost.isAnyLocalAddress());
+ perr("isLinkLocalAddress:"+localHost.isLinkLocalAddress());
+ perr("isLoopbackAddress:"+localHost.isLoopbackAddress());
+ perr("isMulticastAddress:"+localHost.isMulticastAddress());
+ }
+
+
+}
Propchange: jmeter/trunk/test/src/org/apache/jmeter/engine/LocalHostTest.java
------------------------------------------------------------------------------
svn:eol-style = native