Adjust to changes in commons.

This commit is contained in:
Olga Maciaszek-Sharma
2020-12-10 14:10:23 +01:00
parent 24884ec277
commit 3e47aae3c6
4 changed files with 7 additions and 10 deletions

View File

@@ -42,7 +42,6 @@ import org.springframework.cloud.sleuth.Tracer;
import org.springframework.cloud.sleuth.test.TestSpanHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.test.annotation.DirtiesContext;
@@ -150,9 +149,10 @@ public class WebClientExceptionTests {
public static class ExceptionServiceLoadBalancerClientConfiguration {
@Bean
public ServiceInstanceListSupplier serviceInstanceListSupplier(Environment env) {
return ServiceInstanceListSuppliers.from("exceptionservice", new DefaultServiceInstance(
"exceptionservice" + "-1", "exceptionservice", "invalid.host.to.break.tests", 1234, false));
public ServiceInstanceListSupplier serviceInstanceListSupplier() {
return ServiceInstanceListSuppliers
.from("exceptionservice", new DefaultServiceInstance(
"exceptionservice" + "-1", "exceptionservice", "invalid.host.to.break.tests", 1234, false));
}
}

View File

@@ -42,7 +42,6 @@ import org.springframework.cloud.sleuth.Tracer;
import org.springframework.cloud.sleuth.test.TestSpanHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
@@ -182,7 +181,7 @@ public abstract class WebClientNotSampledTests {
private int port = 0;
@Bean
public ServiceInstanceListSupplier serviceInstanceListSupplier(Environment env) {
public ServiceInstanceListSupplier serviceInstanceListSupplier() {
return ServiceInstanceListSuppliers.from("fooservice",
new DefaultServiceInstance("fooservice" + "-1", "fooservice", "localhost", port, false));
}

View File

@@ -44,7 +44,6 @@ import org.springframework.cloud.sleuth.test.TestSpanHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.Environment;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
@@ -124,7 +123,7 @@ public abstract class WebClientCustomParserTests {
private int port = 0;
@Bean
public ServiceInstanceListSupplier serviceInstanceListSupplier(Environment env) {
public ServiceInstanceListSupplier serviceInstanceListSupplier() {
return ServiceInstanceListSuppliers.from("fooservice",
new DefaultServiceInstance("fooservice" + "-1", "fooservice", "localhost", port, false));
}

View File

@@ -63,7 +63,6 @@ import org.springframework.cloud.sleuth.exporter.FinishedSpan;
import org.springframework.cloud.sleuth.test.TestSpanHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
@@ -545,7 +544,7 @@ public abstract class WebClientTests {
private int port = 0;
@Bean
public ServiceInstanceListSupplier serviceInstanceListSupplier(Environment env) {
public ServiceInstanceListSupplier serviceInstanceListSupplier() {
return ServiceInstanceListSuppliers.from("fooservice",
new DefaultServiceInstance("fooservice" + "-1", "fooservice", "localhost", port, false));
}