|
14 | 14 | import org.elasticsearch.action.index.IndexRequest;
|
15 | 15 | import org.elasticsearch.action.support.PlainActionFuture;
|
16 | 16 | import org.elasticsearch.action.support.WriteRequest;
|
17 |
| -import org.elasticsearch.common.settings.Setting; |
| 17 | +import org.elasticsearch.common.settings.Settings; |
18 | 18 | import org.elasticsearch.common.transport.TransportAddress;
|
19 | 19 | import org.elasticsearch.compute.operator.DriverTaskRunner;
|
20 | 20 | import org.elasticsearch.compute.operator.exchange.ExchangeService;
|
21 | 21 | import org.elasticsearch.core.TimeValue;
|
22 |
| -import org.elasticsearch.plugins.Plugin; |
23 | 22 | import org.elasticsearch.tasks.TaskCancelledException;
|
24 | 23 | import org.elasticsearch.tasks.TaskInfo;
|
25 |
| -import org.elasticsearch.test.AbstractMultiClustersTestCase; |
26 | 24 | import org.elasticsearch.transport.TransportService;
|
27 | 25 | import org.elasticsearch.xcontent.XContentBuilder;
|
28 | 26 | import org.elasticsearch.xcontent.json.JsonXContent;
|
29 | 27 | import org.elasticsearch.xpack.esql.EsqlTestUtils;
|
30 | 28 | import org.elasticsearch.xpack.esql.plugin.ComputeService;
|
31 |
| -import org.junit.After; |
32 |
| -import org.junit.Before; |
33 | 29 |
|
34 | 30 | import java.util.ArrayList;
|
35 |
| -import java.util.Collection; |
36 | 31 | import java.util.List;
|
37 | 32 | import java.util.concurrent.TimeUnit;
|
38 | 33 |
|
|
44 | 39 | import static org.hamcrest.Matchers.hasSize;
|
45 | 40 | import static org.hamcrest.Matchers.instanceOf;
|
46 | 41 |
|
47 |
| -public class CrossClusterCancellationIT extends AbstractMultiClustersTestCase { |
| 42 | +public class CrossClusterCancellationIT extends AbstractCrossClusterTestCase { |
48 | 43 | private static final String REMOTE_CLUSTER = "cluster-a";
|
49 | 44 |
|
50 | 45 | @Override
|
51 |
| - protected Collection<String> remoteClusterAlias() { |
| 46 | + protected List<String> remoteClusterAlias() { |
52 | 47 | return List.of(REMOTE_CLUSTER);
|
53 | 48 | }
|
54 | 49 |
|
55 | 50 | @Override
|
56 |
| - protected Collection<Class<? extends Plugin>> nodePlugins(String clusterAlias) { |
57 |
| - List<Class<? extends Plugin>> plugins = new ArrayList<>(super.nodePlugins(clusterAlias)); |
58 |
| - plugins.add(EsqlPluginWithEnterpriseOrTrialLicense.class); |
59 |
| - plugins.add(InternalExchangePlugin.class); |
60 |
| - plugins.add(SimplePauseFieldPlugin.class); |
61 |
| - return plugins; |
62 |
| - } |
63 |
| - |
64 |
| - public static class InternalExchangePlugin extends Plugin { |
65 |
| - @Override |
66 |
| - public List<Setting<?>> getSettings() { |
67 |
| - return List.of( |
68 |
| - Setting.timeSetting( |
69 |
| - ExchangeService.INACTIVE_SINKS_INTERVAL_SETTING, |
70 |
| - TimeValue.timeValueMillis(between(3000, 4000)), |
71 |
| - Setting.Property.NodeScope |
72 |
| - ) |
73 |
| - ); |
74 |
| - } |
75 |
| - } |
76 |
| - |
77 |
| - @Before |
78 |
| - public void resetPlugin() { |
79 |
| - SimplePauseFieldPlugin.resetPlugin(); |
80 |
| - } |
81 |
| - |
82 |
| - @After |
83 |
| - public void releasePlugin() { |
84 |
| - SimplePauseFieldPlugin.release(); |
| 51 | + protected Settings nodeSettings() { |
| 52 | + return Settings.builder() |
| 53 | + .put(super.nodeSettings()) |
| 54 | + .put(ExchangeService.INACTIVE_SINKS_INTERVAL_SETTING, TimeValue.timeValueMillis(between(3000, 4000))) |
| 55 | + .build(); |
85 | 56 | }
|
86 | 57 |
|
87 | 58 | @Override
|
|
0 commit comments