minor changes
This commit is contained in:
parent
e9bc235b1c
commit
87153bd9ff
|
@ -11,7 +11,7 @@ zuul:
|
||||||
repository: JPA
|
repository: JPA
|
||||||
policy-list:
|
policy-list:
|
||||||
serviceSimple:
|
serviceSimple:
|
||||||
- limit: 1
|
- limit: 5
|
||||||
refresh-interval: 60
|
refresh-interval: 60
|
||||||
type:
|
type:
|
||||||
- origin
|
- origin
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GreetingControllerTest {
|
||||||
private TestRestTemplate restTemplate;
|
private TestRestTemplate restTemplate;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNotExceedingCapacityRequest() {
|
public void whenRequestNotExceedingCapacity_thenReturnOkResponse() {
|
||||||
ResponseEntity<String> response = this.restTemplate.getForEntity(SIMPLE_GREETING, String.class);
|
ResponseEntity<String> response = this.restTemplate.getForEntity(SIMPLE_GREETING, String.class);
|
||||||
HttpHeaders headers = response.getHeaders();
|
HttpHeaders headers = response.getHeaders();
|
||||||
String key = "rate-limit-application_serviceSimple_127.0.0.1";
|
String key = "rate-limit-application_serviceSimple_127.0.0.1";
|
||||||
|
@ -44,7 +44,7 @@ public class GreetingControllerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExceedingCapacity() throws InterruptedException {
|
public void whenRequestExceedingCapacity_thenReturnTooManyRequestsResponse() throws InterruptedException {
|
||||||
ResponseEntity<String> response = this.restTemplate
|
ResponseEntity<String> response = this.restTemplate
|
||||||
.getForEntity(ADVANCED_GREETING, String.class);
|
.getForEntity(ADVANCED_GREETING, String.class);
|
||||||
HttpHeaders headers = response.getHeaders();
|
HttpHeaders headers = response.getHeaders();
|
||||||
|
@ -95,4 +95,6 @@ public class GreetingControllerTest {
|
||||||
assertNotNull(reset);
|
assertNotNull(reset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue