mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 09:54:55 +00:00
Test: add SuppressForbidden for tests with @Repeat
Original commit: elastic/x-pack-elasticsearch@41247fa507
This commit is contained in:
parent
a5eefb6259
commit
0533b55dbc
@ -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();
|
||||
|
@ -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()
|
||||
|
@ -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 {
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user