Fix security tests

The security tests were broken because of
https://github.com/elastic/x-pack-elasticsearch/issues/2705
so this works around it.

Original commit: elastic/x-pack-elasticsearch@34f499d55e
This commit is contained in:
Nik Everett 2017-10-06 16:03:01 -04:00
parent 5806b620c5
commit 5239e49b75
2 changed files with 4 additions and 3 deletions

View File

@ -12,8 +12,9 @@ integTestCluster {
setting 'xpack.security.audit.index.events.include', '[access_denied, access_granted]' setting 'xpack.security.audit.index.events.include', '[access_denied, access_granted]'
// Try and speed up audit logging without overwelming it // Try and speed up audit logging without overwelming it
setting 'xpack.security.audit.index.flush_interval', '250ms' setting 'xpack.security.audit.index.flush_interval', '250ms'
setting 'xpack.security.audit.index.settings.index.number_of_shards', '1' // NOCOMMIT reenable after https://github.com/elastic/x-pack-elasticsearch/issues/2705 for lower overhead tests
setting 'xpack.security.audit.index.settings.index.refresh_interval', '250ms' // setting 'xpack.security.audit.index.settings.index.number_of_shards', '1'
// setting 'xpack.security.audit.index.settings.index.refresh_interval', '250ms'
// Setup roles used by tests // Setup roles used by tests
extraConfigFile 'x-pack/roles.yml', 'roles.yml' extraConfigFile 'x-pack/roles.yml', 'roles.yml'
/* Setup the one admin user that we run the tests as. /* Setup the one admin user that we run the tests as.

View File

@ -438,7 +438,7 @@ public class RestSqlSecurityIT extends ESRestTestCase {
*/ */
@SafeVarargs @SafeVarargs
private final void assertAuditEvents(CheckedFunction<Map<?, ?>, Boolean, Exception>... eventCheckers) throws Exception { private final void assertAuditEvents(CheckedFunction<Map<?, ?>, Boolean, Exception>... eventCheckers) throws Exception {
assumeFalse("Previous test had an audit-related failure. All subsequent audit related assertions are bogus because we can't " assertFalse("Previous test had an audit-related failure. All subsequent audit related assertions are bogus because we can't "
+ "guarantee that we fully cleaned up after the last test.", auditFailure); + "guarantee that we fully cleaned up after the last test.", auditFailure);
try { try {
assertBusy(() -> { assertBusy(() -> {