Skip to content

Commit be66450

Browse files
committed
disabled randomizedrunner
Signed-off-by: Nils Bandener <[email protected]>
1 parent 4d2e90d commit be66450

File tree

98 files changed

+271
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+271
-290
lines changed

build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ configurations {
485485
force "org.checkerframework:checker-qual:3.49.5"
486486
force "ch.qos.logback:logback-classic:1.5.18"
487487
force "commons-io:commons-io:2.20.0"
488-
force "com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.3"
489488
force "org.hamcrest:hamcrest:2.2"
490489
force "org.mockito:mockito-core:5.19.0"
491490
force "net.bytebuddy:byte-buddy:1.17.7"
@@ -525,9 +524,6 @@ allprojects {
525524
testImplementation "org.mockito:mockito-core:5.19.0"
526525

527526
//integration test framework:
528-
integrationTestImplementation('com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.3') {
529-
exclude(group: 'junit', module: 'junit')
530-
}
531527
integrationTestImplementation 'junit:junit:4.13.2'
532528
integrationTestImplementation("org.opensearch.plugin:reindex-client:${opensearch_version}"){
533529
exclude(group: 'org.slf4j', module: 'slf4j-api')

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/MigrateApiTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.List;
1515
import java.util.Map;
1616

17-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
17+
1818
import com.fasterxml.jackson.databind.ObjectMapper;
1919
import com.fasterxml.jackson.databind.node.ArrayNode;
2020
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -52,8 +52,8 @@
5252
import static org.opensearch.security.support.ConfigConstants.SECURITY_SYSTEM_INDICES_ENABLED_KEY;
5353
import static org.opensearch.test.framework.TestSecurityConfig.AuthcDomain.AUTHC_HTTPBASIC_INTERNAL;
5454

55-
@RunWith(com.carrotsearch.randomizedtesting.RandomizedRunner.class)
56-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
55+
56+
5757
public class MigrateApiTests {
5858

5959
private static final String RESOURCE_SHARING_INDEX = getSharingIndex(RESOURCE_INDEX_NAME);

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/SecurityDisabledTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import java.util.List;
1212
import java.util.Map;
1313

14-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
14+
1515
import org.apache.http.HttpStatus;
1616
import org.junit.After;
1717
import org.junit.ClassRule;
@@ -46,8 +46,8 @@
4646
* This class defines a test scenario where security plugin is disabled
4747
* It checks access through sample plugin as well as through direct security API calls
4848
*/
49-
@RunWith(com.carrotsearch.randomizedtesting.RandomizedRunner.class)
50-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
49+
50+
5151
public class SecurityDisabledTests {
5252

5353
@ClassRule

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/ShareApiTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.Set;
1515

1616
import com.carrotsearch.randomizedtesting.RandomizedRunner;
17-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
17+
1818
import org.apache.http.HttpStatus;
1919
import org.junit.After;
2020
import org.junit.Before;
@@ -71,7 +71,7 @@ public void clearIndices() {
7171
* Tests exercising the share API endpoints, GET, PUT & PATCH
7272
*/
7373
@RunWith(RandomizedRunner.class)
74-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
74+
7575
public static class RoutesTests extends BaseTests {
7676
private final TestUtils.ApiHelper api = new TestUtils.ApiHelper(cluster);
7777
private String adminResId;

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/disabled/ApiAccessTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package org.opensearch.sample.resource.feature.disabled;
1010

1111
import com.carrotsearch.randomizedtesting.RandomizedRunner;
12-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
12+
1313
import org.apache.http.HttpStatus;
1414
import org.junit.After;
1515
import org.junit.Before;
@@ -58,7 +58,7 @@ public class ApiAccessTests {
5858
* Only those users with appropriate index permissions will be able to access resources via APIs
5959
*/
6060
@RunWith(RandomizedRunner.class)
61-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
61+
6262
public static class SystemIndexEnabled {
6363

6464
@ClassRule
@@ -284,7 +284,7 @@ public void testApiAccess_adminCertificateUsers() {
284284
* All users can access all resources through the plugin APIs given they have appropriate index permission, since system index protection is disabled
285285
*/
286286
@RunWith(RandomizedRunner.class)
287-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
287+
288288
public static class SystemIndexDisabled {
289289

290290
@ClassRule

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/disabled/DirectIndexAccessTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package org.opensearch.sample.resource.feature.disabled;
1010

1111
import com.carrotsearch.randomizedtesting.RandomizedRunner;
12-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
12+
1313
import org.apache.http.HttpStatus;
1414
import org.junit.After;
1515
import org.junit.Before;
@@ -45,7 +45,7 @@ public class DirectIndexAccessTests {
4545
* No user except super-admin can access documents directly since system index protection is enabled
4646
*/
4747
@RunWith(RandomizedRunner.class)
48-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
48+
4949
public static class SystemIndexEnabled {
5050

5151
@ClassRule
@@ -154,7 +154,7 @@ public void testRawAccess_adminCertificateUser() {
154154
* Users with appropriate index permissions will be able to access and update resources directly, since system index protection is disabled
155155
*/
156156
@RunWith(RandomizedRunner.class)
157-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
157+
158158
public static class SystemIndexDisabled {
159159

160160
@ClassRule

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/enabled/ApiAccessTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package org.opensearch.sample.resource.feature.enabled;
1010

1111
import com.carrotsearch.randomizedtesting.RandomizedRunner;
12-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
12+
1313
import org.apache.http.HttpStatus;
1414
import org.junit.After;
1515
import org.junit.Before;
@@ -57,7 +57,7 @@ public class ApiAccessTests {
5757
* Users can only access resources they are shared with or owner of.
5858
*/
5959
@RunWith(RandomizedRunner.class)
60-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
60+
6161
public static class SystemIndexEnabled {
6262

6363
@ClassRule
@@ -279,7 +279,7 @@ public void testApiAccess_superAdmin() {
279279
* Users will only be able to access resources they are shared_with or owner of, via plugin APIs, even if system index protection is disabled.
280280
*/
281281
@RunWith(RandomizedRunner.class)
282-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
282+
283283
public static class SystemIndexDisabled {
284284
@ClassRule
285285
public static LocalCluster cluster = newCluster(true, false);

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/enabled/DirectIndexAccessTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package org.opensearch.sample.resource.feature.enabled;
1010

1111
import com.carrotsearch.randomizedtesting.RandomizedRunner;
12-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
12+
1313
import org.apache.http.HttpStatus;
1414
import org.junit.After;
1515
import org.junit.Before;
@@ -50,7 +50,7 @@ public class DirectIndexAccessTests {
5050
* This is how the feature is intended to be utilized.
5151
*/
5252
@RunWith(RandomizedRunner.class)
53-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
53+
5454
public static class SystemIndexEnabled {
5555

5656
@ClassRule
@@ -167,7 +167,7 @@ public void testRawAccess_superAdmin() {
167167
* Shows the importance of System-Index protection feature for this new authz mechanism, by showing what would happen if SIP is disabled and the feature is enabled.
168168
*/
169169
@RunWith(RandomizedRunner.class)
170-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
170+
171171
public static class SystemIndexDisabled {
172172

173173
@ClassRule

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/enabled/DryRunAccessTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import java.util.List;
1212

1313
import com.carrotsearch.randomizedtesting.RandomizedRunner;
14-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
14+
1515
import org.apache.http.HttpStatus;
1616
import org.junit.After;
1717
import org.junit.Before;
@@ -47,7 +47,7 @@
4747
* These tests run simulation on resource access
4848
*/
4949
@RunWith(RandomizedRunner.class)
50-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
50+
5151
public class DryRunAccessTests {
5252

5353
@ClassRule

sample-resource-plugin/src/integrationTest/java/org/opensearch/sample/resource/feature/enabled/multi_share/AdminCertificateAccessTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package org.opensearch.sample.resource.feature.enabled.multi_share;
1010

1111
import com.carrotsearch.randomizedtesting.RandomizedRunner;
12-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
12+
1313
import org.apache.http.HttpStatus;
1414
import org.junit.ClassRule;
1515
import org.junit.Test;
@@ -40,7 +40,7 @@
4040
* All tests are against USER_ADMIN's resource created during setup.
4141
*/
4242
@RunWith(RandomizedRunner.class)
43-
@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
43+
4444
public class AdminCertificateAccessTests {
4545
@ClassRule
4646
public static LocalCluster cluster = newCluster(true, true);

0 commit comments

Comments
 (0)