Merge branch '1.3.x
This commit is contained in:
@@ -69,7 +69,7 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>>
|
||||
Thread.sleep(500L);
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Swallow exception and continue
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
ShutdownEndpoint.this.context.close();
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class HeapdumpMvcEndpoint extends AbstractMvcEndpoint implements MvcEndpo
|
||||
}
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
// Ignore
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ public class HeapdumpMvcEndpointTests {
|
||||
public void invokeWhenLockedShouldReturnTooManyRequestsStatus() throws Exception {
|
||||
this.endpoint.setLocked(true);
|
||||
this.mvc.perform(get("/heapdump")).andExpect(status().isTooManyRequests());
|
||||
assertThat(Thread.interrupted()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user