Speed up audit log testing for SQL (elastic/x-pack-elasticsearch#2721)

SQL was cleaning up the audit logs *after* each test
but this switches it to cleaning up the audit logs
*before* each test. This is faster because we can
generate a lot of audit logs before the first test.

Original commit: elastic/x-pack-elasticsearch@71d8f76667
This commit is contained in:
Nik Everett 2017-10-10 16:48:37 -04:00 committed by GitHub
parent 9633b1d7bc
commit b02e569b38
1 changed files with 1 additions and 2 deletions

View File

@ -21,7 +21,6 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.test.NotEqualMessageBuilder;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.hamcrest.Matcher;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@ -94,7 +93,7 @@ public class RestSqlSecurityIT extends ESRestTestCase {
* are likely audit log events and will cause the tests to
* hang at best and at worst. Then remove all audit logs.
*/
@After
@Before
public void cleanAuditLog() throws Exception {
assertBusy(() -> {
Set<String> bulks = new HashSet<>();