Test: assert that the current thread is not already interrupted

Original commit: elastic/x-pack-elasticsearch@acc517ca53
This commit is contained in:
jaymode 2015-06-17 09:32:03 -04:00
parent d036fc505d
commit 853f8d50ef

View File

@ -617,6 +617,7 @@ public class IndexAuditTrail extends AbstractComponent implements AuditTrail {
}
authenticationService.attachUserHeaderIfMissing(request, auditUser.user());
assert !Thread.currentThread().isInterrupted() : "current thread has been interrupted before putting index template!!!";
PutIndexTemplateResponse response = client.admin().indices().putTemplate(request).actionGet();
if (!response.isAcknowledged()) {
throw new ShieldException("failed to put index template for audit logging");