From 0533b55dbcfade8a9d714265ffbda9e39aeb679f Mon Sep 17 00:00:00 2001 From: jaymode Date: Thu, 18 Jun 2015 14:55:33 -0400 Subject: [PATCH] Test: add SuppressForbidden for tests with @Repeat Original commit: elastic/x-pack-elasticsearch@41247fa50717136c3737172170f07e78693ed24c --- .../shield/audit/logfile/LoggingAuditTrailTests.java | 3 +++ .../elasticsearch/shield/authc/esusers/ESUsersRealmTests.java | 2 ++ .../java/org/elasticsearch/shield/support/ValidationTests.java | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java b/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java index 29ebbc234c9..48484aee324 100644 --- a/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java +++ b/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.shield.audit.logfile; import com.carrotsearch.randomizedtesting.annotations.Repeat; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.network.NetworkUtils; @@ -40,6 +41,7 @@ import static org.mockito.Mockito.when; /** * */ +@SuppressForbidden(reason = "this test should repeat") @Repeat(iterations = 10) public class LoggingAuditTrailTests extends ElasticsearchTestCase { @@ -481,6 +483,7 @@ public class LoggingAuditTrailTests extends ElasticsearchTestCase { } } + @SuppressForbidden(reason = "this test should repeat") @Test @Repeat(iterations = 10) public void testOriginAttributes() throws Exception { MockMessage message = new MockMessage(); diff --git a/src/test/java/org/elasticsearch/shield/authc/esusers/ESUsersRealmTests.java b/src/test/java/org/elasticsearch/shield/authc/esusers/ESUsersRealmTests.java index d00c1440ffd..3fd037617c6 100644 --- a/src/test/java/org/elasticsearch/shield/authc/esusers/ESUsersRealmTests.java +++ b/src/test/java/org/elasticsearch/shield/authc/esusers/ESUsersRealmTests.java @@ -16,6 +16,7 @@ import org.elasticsearch.client.Client; import org.elasticsearch.client.ClusterAdminClient; import org.elasticsearch.client.IndicesAdminClient; import org.elasticsearch.client.support.Headers; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.rest.BaseRestHandler; @@ -81,6 +82,7 @@ public class ESUsersRealmTests extends ElasticsearchTestCase { assertThat(user.roles(), arrayContaining("role1", "role2")); } + @SuppressForbidden(reason = "this test should repeat") @Test @Repeat(iterations = 20) public void testAuthenticate_Caching() throws Exception { Settings settings = Settings.builder() diff --git a/src/test/java/org/elasticsearch/shield/support/ValidationTests.java b/src/test/java/org/elasticsearch/shield/support/ValidationTests.java index 5c59cb6e759..364628a5d8e 100644 --- a/src/test/java/org/elasticsearch/shield/support/ValidationTests.java +++ b/src/test/java/org/elasticsearch/shield/support/ValidationTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.shield.support; import com.carrotsearch.randomizedtesting.annotations.Repeat; +import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.test.ElasticsearchTestCase; import org.junit.Test; @@ -19,6 +20,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ +@SuppressForbidden(reason = "these tests should repeat") public class ValidationTests extends ElasticsearchTestCase {