File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins
test/framework/src/main/java/org/opensearch/test Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 3333package org .opensearch .plugins ;
3434
3535import com .carrotsearch .randomizedtesting .annotations .ParametersFactory ;
36+ import com .carrotsearch .randomizedtesting .annotations .ThreadLeakFilters ;
3637
3738import com .google .common .jimfs .Configuration ;
3839import com .google .common .jimfs .Jimfs ;
7172import org .opensearch .env .Environment ;
7273import org .opensearch .env .TestEnvironment ;
7374import org .opensearch .semver .SemverRange ;
75+ import org .opensearch .test .BouncyCastleThreadFilter ;
7476import org .opensearch .test .OpenSearchTestCase ;
7577import org .opensearch .test .PosixPermissionsResetter ;
7678import org .opensearch .test .VersionUtils ;
134136import static org .hamcrest .Matchers .startsWith ;
135137
136138@ LuceneTestCase .SuppressFileSystems ("*" )
139+ @ ThreadLeakFilters (filters = BouncyCastleThreadFilter .class )
137140public class InstallPluginCommandTests extends OpenSearchTestCase {
138141
139142 private InstallPluginCommand skipJarHellCommand ;
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-License-Identifier: Apache-2.0
3+ *
4+ * The OpenSearch Contributors require contributions made to
5+ * this file be licensed under the Apache-2.0 license or a
6+ * compatible open source license.
7+ */
8+
9+ package org .opensearch .test ;
10+
11+ import com .carrotsearch .randomizedtesting .ThreadFilter ;
12+
13+ /**
14+ * ThreadFilter to exclude ThreadLeak checks for BC’s global background threads
15+ */
16+ public class BouncyCastleThreadFilter implements ThreadFilter {
17+ @ Override
18+ public boolean reject (Thread t ) {
19+ String n = t .getName ();
20+ // Ignore BC’s global background threads
21+ return "BC Disposal Daemon" .equals (n ) || "BC Cleanup Executor" .equals (n );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments