From 5239e49b75f595cbe125bd6611f33d572a05ce89 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 6 Oct 2017 16:03:01 -0400 Subject: [PATCH] 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@34f499d55efa15cee84d2c4ad1db7366f42edc80 --- qa/sql/security/build.gradle | 5 +++-- .../xpack/qa/sql/security/RestSqlSecurityIT.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qa/sql/security/build.gradle b/qa/sql/security/build.gradle index 679edaacfb5..9ed3d1298c8 100644 --- a/qa/sql/security/build.gradle +++ b/qa/sql/security/build.gradle @@ -12,8 +12,9 @@ integTestCluster { setting 'xpack.security.audit.index.events.include', '[access_denied, access_granted]' // Try and speed up audit logging without overwelming it setting 'xpack.security.audit.index.flush_interval', '250ms' - setting 'xpack.security.audit.index.settings.index.number_of_shards', '1' - setting 'xpack.security.audit.index.settings.index.refresh_interval', '250ms' + // NOCOMMIT reenable after https://github.com/elastic/x-pack-elasticsearch/issues/2705 for lower overhead tests + // 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 extraConfigFile 'x-pack/roles.yml', 'roles.yml' /* Setup the one admin user that we run the tests as. diff --git a/qa/sql/security/src/test/java/org/elasticsearch/xpack/qa/sql/security/RestSqlSecurityIT.java b/qa/sql/security/src/test/java/org/elasticsearch/xpack/qa/sql/security/RestSqlSecurityIT.java index 80bada842f0..570671fc05e 100644 --- a/qa/sql/security/src/test/java/org/elasticsearch/xpack/qa/sql/security/RestSqlSecurityIT.java +++ b/qa/sql/security/src/test/java/org/elasticsearch/xpack/qa/sql/security/RestSqlSecurityIT.java @@ -438,7 +438,7 @@ public class RestSqlSecurityIT extends ESRestTestCase { */ @SafeVarargs private final void assertAuditEvents(CheckedFunction, 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); try { assertBusy(() -> {