Skip to content

Commit

Permalink
Issue ReactiveX#179: Initial Spring Boot 2.0 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Winkler committed Mar 16, 2018
1 parent afa27b7 commit cd078ed
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libraries.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ext {
assertjVersion = '3.6.2'
logbackVersion = '0.9.26'
mockitoVersion = '2.15.0'
powermockVersion = '1.6.6'
powermockVersion = '1.7.0'
jcacheVersion = '1.0.0'
awaitilityVersion = '1.7.0'
metricsVersion = '3.2.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpoint;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import io.github.resilience4j.circuitbreaker.CircuitBreaker;
Expand All @@ -39,7 +39,7 @@
import reactor.core.publisher.Flux;


@Controller
@RestController
@WebEndpoint(id = "circuitbreaker")
@RequestMapping(value = "circuitbreaker", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public class CircuitBreakerEventsEndpoint {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
public @interface RateLimiter {
/**
* Name of the rate limiter
* @return
*/
String name();
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public void testCircuitBreakerAutoConfiguration() throws IOException {

// Test Actuator endpoints

ResponseEntity<CircuitBreakerEndpointResponse> circuitBreakerList = restTemplate.getForEntity("/actuator/circuitbreaker", CircuitBreakerEndpointResponse.class);
ResponseEntity<CircuitBreakerEndpointResponse> circuitBreakerList = restTemplate.getForEntity("/circuitbreaker", CircuitBreakerEndpointResponse.class);
assertThat(circuitBreakerList.getBody().getCircuitBreakers()).hasSize(2).containsExactly("backendA", "backendB");


ResponseEntity<CircuitBreakerEventsEndpointResponse> circuitBreakerEventList = restTemplate.getForEntity("/actuator/circuitbreaker/events", CircuitBreakerEventsEndpointResponse.class);
ResponseEntity<CircuitBreakerEventsEndpointResponse> circuitBreakerEventList = restTemplate.getForEntity("/circuitbreaker/events", CircuitBreakerEventsEndpointResponse.class);
assertThat(circuitBreakerEventList.getBody().getCircuitBreakerEvents()).hasSize(2);

assertThat(circuitBreakerAspect.getOrder()).isEqualTo(400);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void testRateLimiterAutoConfiguration() throws IOException {
// Test Actuator endpoints

ResponseEntity<RateLimiterEndpointResponse> rateLimiterList = restTemplate
.getForEntity("/actuator/ratelimiter", RateLimiterEndpointResponse.class);
.getForEntity("/ratelimiter", RateLimiterEndpointResponse.class);

assertThat(rateLimiterList.getBody().getRateLimitersNames()).hasSize(2).containsExactly("backendA", "backendB");

Expand All @@ -106,7 +106,7 @@ public void testRateLimiterAutoConfiguration() throws IOException {
}

ResponseEntity<RateLimiterEventsEndpointResponse> rateLimiterEventList = restTemplate
.getForEntity("/actuator/ratelimiter/events", RateLimiterEventsEndpointResponse.class);
.getForEntity("/ratelimiter/events", RateLimiterEventsEndpointResponse.class);

List<RateLimiterEventDTO> eventsList = rateLimiterEventList.getBody().getEventsList();
assertThat(eventsList).isNotEmpty();
Expand Down

0 comments on commit cd078ed

Please sign in to comment.