Skip to content

Commit

Permalink
Make sure loadbalancer is called
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Oct 24, 2024
1 parent a866341 commit acac145
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.context.annotation.Bean;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestClient;

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

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

Expand Down

0 comments on commit acac145

Please sign in to comment.