Test: Fix IndexAuditTrailMutedTests to set the threadpool

The IndexAuditTrailMutedTests have a threadpool but fail to set it on the test client, which causes
a NPE and tests to fail.

Original commit: elastic/x-pack-elasticsearch@d34a4ce080
This commit is contained in:
jaymode 2017-04-05 13:46:38 -04:00
parent 16f5f44d41
commit 7efc9e1270
2 changed files with 8 additions and 4 deletions

View File

@ -310,7 +310,10 @@ public class IndexAuditTrail extends AbstractComponent implements AuditTrail, Cl
});
} else if (master) {
putTemplate(customAuditIndexSettings(settings), ActionListener.wrap((v) -> innerStart(),
(e) -> state.set(State.FAILED)));
(e) -> {
logger.error("failed to put audit trail template", e);
state.set(State.FAILED);
}));
} else {
innerStart();
}

View File

@ -63,8 +63,9 @@ public class IndexAuditTrailMutedTests extends ESTestCase {
clientCalled = new AtomicBoolean(false);
class IClient extends InternalClient {
IClient(Client transportClient){
super(Settings.EMPTY, null, transportClient);
super(Settings.EMPTY, threadPool, transportClient);
}
@Override
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(