Skip to content

Commit acac145

Browse files
committed
Make sure loadbalancer is called
1 parent a866341 commit acac145

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/LoadBalancedRestClientIntegrationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.springframework.boot.test.context.SpringBootTest;
2626
import org.springframework.cloud.client.ServiceInstance;
2727
import org.springframework.context.annotation.Bean;
28+
import org.springframework.http.ResponseEntity;
2829
import org.springframework.web.client.RestClient;
2930

3031
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -50,7 +51,7 @@ void shouldBuildLoadBalancedRestClientInConstructor() {
5051
RestClient client = restClientBuilder.build();
5152

5253
// Interceptors are not visible in RestClient
53-
assertThatThrownBy(() -> client.get().uri("http://test-service").retrieve())
54+
assertThatThrownBy(() -> client.get().uri("http://test-service").retrieve().toBodilessEntity())
5455
.hasMessage("LoadBalancerInterceptor invoked.");
5556
}
5657

0 commit comments

Comments
 (0)