From b110d564a040d13f6cb71abb7819c1d514f7d6b4 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 22 Jan 2018 17:58:28 +0100 Subject: [PATCH 1/4] Test --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index d64569567..4076dd72d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -34,7 +34,7 @@ and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a + Object form, made asdasdasdasavailable under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). From b2afd0b4a959686354f7235668f455cf37f5fd17 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 22 Jan 2018 17:59:11 +0100 Subject: [PATCH 2/4] Update LICENSE.txt --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 4076dd72d..d64569567 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -34,7 +34,7 @@ and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or - Object form, made asdasdasdasavailable under the License, as indicated by a + Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). From 0bdb39c9cd3664e9b7068e8060043d7ce78ef811 Mon Sep 17 00:00:00 2001 From: kamnowisz Date: Mon, 22 Jan 2018 19:31:48 +0100 Subject: [PATCH 3/4] Optimize default endpoint ip address resolution (#831) --- .../sleuth/zipkin2/DefaultEndpointLocator.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java index 402165ab8..815237abe 100644 --- a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java +++ b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java @@ -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; @@ -52,24 +53,27 @@ public class DefaultEndpointLocator implements EndpointLocator { private final Registration registration; private final ServerProperties serverProperties; - private final InetUtils inetUtils; private final ZipkinProperties zipkinProperties; private final RelaxedPropertyResolver resolver; private Integer port; + private InetAddress firstNonLoopbackAddress; public DefaultEndpointLocator(Registration registration, ServerProperties serverProperties, Environment environment, ZipkinProperties zipkinProperties, InetUtils inetUtils) { this.registration = registration; this.serverProperties = serverProperties; this.zipkinProperties = zipkinProperties; - if (inetUtils == null) { - this.inetUtils = new InetUtils(new InetUtilsProperties()); - } else { - this.inetUtils = inetUtils; - } + this.firstNonLoopbackAddress = findFirstNonLoopbackAddress(inetUtils); this.resolver = new RelaxedPropertyResolver(environment); } + private InetAddress findFirstNonLoopbackAddress(InetUtils inetUtils) { + if (inetUtils == null) { + inetUtils = new InetUtils(new InetUtilsProperties()); + } + return inetUtils.findFirstNonLoopbackAddress(); + } + @Override public Endpoint local() { String serviceName = getLocalServiceName(); @@ -124,7 +128,7 @@ public class DefaultEndpointLocator implements EndpointLocator { return builder; } else { - return builder.ip(this.inetUtils.findFirstNonLoopbackAddress()); + return builder.ip(this.firstNonLoopbackAddress); } } } From d4b9f8b1199ad64bb04791d32ae3f964a87b6add Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 25 Jan 2018 13:47:50 +0100 Subject: [PATCH 4/4] Added branch checking --- scripts/runAcceptanceTests.sh | 5 +++-- scripts/runAcceptanceTestsStream.sh | 5 +++-- scripts/runAcceptanceTestsStreamKafka.sh | 5 +++-- scripts/runAcceptanceTestsStreamOnCF.sh | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/runAcceptanceTests.sh b/scripts/runAcceptanceTests.sh index e6fdf5c88..695effb56 100755 --- a/scripts/runAcceptanceTests.sh +++ b/scripts/runAcceptanceTests.sh @@ -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="edgware" 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}" diff --git a/scripts/runAcceptanceTestsStream.sh b/scripts/runAcceptanceTestsStream.sh index 7290c52b5..586973d50 100755 --- a/scripts/runAcceptanceTestsStream.sh +++ b/scripts/runAcceptanceTestsStream.sh @@ -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="edgware" 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}" diff --git a/scripts/runAcceptanceTestsStreamKafka.sh b/scripts/runAcceptanceTestsStreamKafka.sh index d6dd00c1f..d6e772b0e 100755 --- a/scripts/runAcceptanceTestsStreamKafka.sh +++ b/scripts/runAcceptanceTestsStreamKafka.sh @@ -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="edgware" 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}" diff --git a/scripts/runAcceptanceTestsStreamOnCF.sh b/scripts/runAcceptanceTestsStreamOnCF.sh index 4c7080fd5..48a2c0e95 100755 --- a/scripts/runAcceptanceTestsStreamOnCF.sh +++ b/scripts/runAcceptanceTestsStreamOnCF.sh @@ -13,4 +13,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}"