Merge branch '1.3.x'
This commit is contained in:
@@ -6,6 +6,7 @@ mkdir -p target
|
||||
|
||||
SCRIPT_URL="https://raw.githubusercontent.com/spring-cloud-samples/brewery/master/runAcceptanceTests.sh"
|
||||
AT_WHAT_TO_TEST="SLEUTH"
|
||||
BRANCH_NAME="master"
|
||||
|
||||
cd target
|
||||
|
||||
@@ -14,6 +15,6 @@ curl "${SCRIPT_URL}" --output runAcceptanceTests.sh
|
||||
chmod +x runAcceptanceTests.sh
|
||||
|
||||
echo "Killing all running apps"
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n -br "${BRANCH_NAME}"
|
||||
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --killattheend
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --killattheend -br "${BRANCH_NAME}"
|
||||
|
||||
@@ -6,6 +6,7 @@ mkdir -p target
|
||||
|
||||
SCRIPT_URL="https://raw.githubusercontent.com/spring-cloud-samples/brewery/master/runAcceptanceTests.sh"
|
||||
AT_WHAT_TO_TEST="SLEUTH_STREAM"
|
||||
BRANCH_NAME="master"
|
||||
|
||||
cd target
|
||||
|
||||
@@ -14,6 +15,6 @@ curl "${SCRIPT_URL}" --output runAcceptanceTests.sh
|
||||
chmod +x runAcceptanceTests.sh
|
||||
|
||||
echo "Killing all running apps"
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n -br "${BRANCH_NAME}"
|
||||
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --killattheend
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --killattheend -br "${BRANCH_NAME}"
|
||||
|
||||
@@ -6,14 +6,15 @@ mkdir -p target
|
||||
|
||||
SCRIPT_URL="https://raw.githubusercontent.com/spring-cloud-samples/brewery/master/runAcceptanceTests.sh"
|
||||
AT_WHAT_TO_TEST="SLEUTH_STREAM"
|
||||
BRANCH_NAME="master"
|
||||
|
||||
cd target
|
||||
|
||||
curl "${SCRIPT_URL}" --output runAcceptanceTests.sh
|
||||
curl "${SCRIPT_URL}" --output runAcceptanceTests.sh -br "${BRANCH_NAME}"
|
||||
|
||||
chmod +x runAcceptanceTests.sh
|
||||
|
||||
echo "Killing all running apps"
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n
|
||||
|
||||
./runAcceptanceTests.sh --kafka --whattotest "${AT_WHAT_TO_TEST}" --killattheend -cli "1.3.3.BUILD-SNAPSHOT"
|
||||
./runAcceptanceTests.sh --kafka --whattotest "${AT_WHAT_TO_TEST}" --killattheend -cli "1.3.3.BUILD-SNAPSHOT" -br "${BRANCH_NAME}"
|
||||
|
||||
@@ -6,6 +6,7 @@ mkdir -p target
|
||||
|
||||
SCRIPT_URL="https://raw.githubusercontent.com/spring-cloud-samples/brewery/master/runAcceptanceTests.sh"
|
||||
AT_WHAT_TO_TEST="SLEUTH_STREAM"
|
||||
BRANCH_NAME="master"
|
||||
|
||||
cd target
|
||||
|
||||
@@ -13,4 +14,4 @@ curl "${SCRIPT_URL}" --output runAcceptanceTests.sh
|
||||
|
||||
chmod +x runAcceptanceTests.sh
|
||||
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --usecloudfoundry --reset
|
||||
./runAcceptanceTests.sh --whattotest "${AT_WHAT_TO_TEST}" --usecloudfoundry --reset -br "${BRANCH_NAME}"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.cloud.sleuth.zipkin2;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -53,9 +54,9 @@ public class DefaultEndpointLocator implements EndpointLocator,
|
||||
private final Registration registration;
|
||||
private final ServerProperties serverProperties;
|
||||
private final Environment environment;
|
||||
private final InetUtils inetUtils;
|
||||
private final ZipkinProperties zipkinProperties;
|
||||
private Integer port;
|
||||
private InetAddress firstNonLoopbackAddress;
|
||||
|
||||
public DefaultEndpointLocator(Registration registration, ServerProperties serverProperties,
|
||||
Environment environment, ZipkinProperties zipkinProperties, InetUtils inetUtils) {
|
||||
@@ -63,11 +64,14 @@ public class DefaultEndpointLocator implements EndpointLocator,
|
||||
this.serverProperties = serverProperties;
|
||||
this.environment = environment;
|
||||
this.zipkinProperties = zipkinProperties;
|
||||
this.firstNonLoopbackAddress = findFirstNonLoopbackAddress(inetUtils);
|
||||
}
|
||||
|
||||
private InetAddress findFirstNonLoopbackAddress(InetUtils inetUtils) {
|
||||
if (inetUtils == null) {
|
||||
this.inetUtils = new InetUtils(new InetUtilsProperties());
|
||||
} else {
|
||||
this.inetUtils = inetUtils;
|
||||
inetUtils = new InetUtils(new InetUtilsProperties());
|
||||
}
|
||||
return inetUtils.findFirstNonLoopbackAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,7 +128,7 @@ public class DefaultEndpointLocator implements EndpointLocator,
|
||||
return builder;
|
||||
}
|
||||
else {
|
||||
return builder.ip(this.inetUtils.findFirstNonLoopbackAddress());
|
||||
return builder.ip(this.firstNonLoopbackAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user