Skip to content

Commit 39e6db5

Browse files
authored
Searchable snapshots integ tests should inherit node plugins (#80404) (#80432)
1 parent d10e121 commit 39e6db5

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/SearchableSnapshotsCanMatchOnCoordinatorIntegTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.elasticsearch.common.Strings;
1919
import org.elasticsearch.common.settings.Settings;
2020
import org.elasticsearch.common.unit.ByteSizeValue;
21+
import org.elasticsearch.common.util.CollectionUtils;
2122
import org.elasticsearch.index.Index;
2223
import org.elasticsearch.index.mapper.DateFieldMapper;
2324
import org.elasticsearch.index.query.QueryBuilders;
@@ -27,7 +28,6 @@
2728
import org.elasticsearch.plugins.Plugin;
2829
import org.elasticsearch.search.builder.SearchSourceBuilder;
2930
import org.elasticsearch.snapshots.SnapshotId;
30-
import org.elasticsearch.snapshots.mockstore.MockRepository;
3131
import org.elasticsearch.test.ESIntegTestCase;
3232
import org.elasticsearch.test.transport.MockTransportService;
3333
import org.elasticsearch.xcontent.XContentFactory;
@@ -58,7 +58,7 @@ public class SearchableSnapshotsCanMatchOnCoordinatorIntegTests extends BaseFroz
5858

5959
@Override
6060
protected Collection<Class<? extends Plugin>> nodePlugins() {
61-
return List.of(LocalStateSearchableSnapshots.class, MockTransportService.TestPlugin.class, MockRepository.Plugin.class);
61+
return CollectionUtils.appendToCopy(super.nodePlugins(), MockTransportService.TestPlugin.class);
6262
}
6363

6464
@Override

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/allocation/SearchableSnapshotEnableAllocationDeciderIntegTests.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@
1212
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
1313
import org.elasticsearch.common.settings.Setting;
1414
import org.elasticsearch.common.settings.Settings;
15-
import org.elasticsearch.plugins.Plugin;
1615
import org.elasticsearch.snapshots.SnapshotId;
17-
import org.elasticsearch.snapshots.mockstore.MockRepository;
1816
import org.elasticsearch.test.ESIntegTestCase;
1917
import org.elasticsearch.xpack.searchablesnapshots.BaseSearchableSnapshotsIntegTestCase;
2018
import org.elasticsearch.xpack.searchablesnapshots.allocation.decider.SearchableSnapshotEnableAllocationDecider;
2119
import org.hamcrest.Matchers;
2220

23-
import java.util.ArrayList;
24-
import java.util.Collection;
2521
import java.util.List;
2622
import java.util.Locale;
2723
import java.util.Set;
@@ -31,13 +27,6 @@
3127
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
3228
public class SearchableSnapshotEnableAllocationDeciderIntegTests extends BaseSearchableSnapshotsIntegTestCase {
3329

34-
@Override
35-
protected Collection<Class<? extends Plugin>> nodePlugins() {
36-
List<Class<? extends Plugin>> plugins = new ArrayList<>(super.nodePlugins());
37-
plugins.add(MockRepository.Plugin.class);
38-
return plugins;
39-
}
40-
4130
public void testAllocationDisabled() throws Exception {
4231
final String restoredIndexName = setupMountedIndex();
4332
int numPrimaries = getNumShards(restoredIndexName).numPrimaries;

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/allocation/SearchableSnapshotsRelocationIntegTests.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
import org.elasticsearch.index.Index;
1515
import org.elasticsearch.indices.IndicesService;
1616
import org.elasticsearch.indices.recovery.RecoveryState;
17-
import org.elasticsearch.plugins.Plugin;
18-
import org.elasticsearch.snapshots.mockstore.MockRepository;
1917
import org.elasticsearch.test.ESIntegTestCase;
2018
import org.elasticsearch.threadpool.ThreadPool;
2119
import org.elasticsearch.xpack.searchablesnapshots.BaseSearchableSnapshotsIntegTestCase;
22-
import org.elasticsearch.xpack.searchablesnapshots.LocalStateSearchableSnapshots;
2320
import org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshots;
2421
import org.hamcrest.Matchers;
2522

26-
import java.util.Collection;
2723
import java.util.List;
2824
import java.util.concurrent.CountDownLatch;
2925
import java.util.concurrent.CyclicBarrier;
@@ -36,11 +32,6 @@
3632
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
3733
public class SearchableSnapshotsRelocationIntegTests extends BaseSearchableSnapshotsIntegTestCase {
3834

39-
@Override
40-
protected Collection<Class<? extends Plugin>> nodePlugins() {
41-
return List.of(LocalStateSearchableSnapshots.class, MockRepository.Plugin.class);
42-
}
43-
4435
public void testRelocationWaitsForPreWarm() throws Exception {
4536
internalCluster().startMasterOnlyNode();
4637
final String firstDataNode = internalCluster().startDataOnlyNode();

0 commit comments

Comments
 (0)