Merge branch '1.3.x

This commit is contained in:
Andy Wilkinson
2016-07-11 17:03:16 +01:00
11 changed files with 14 additions and 8 deletions

View File

@@ -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();
}

View File

@@ -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());
}

View File

@@ -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