mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 05:58:44 +00:00
Fix non integration tests
With change #24, non integration can not run anymore. (cherry picked from commit 76eecc8)
This commit is contained in:
parent
45492c009c
commit
88ddd31d0b
@ -20,12 +20,13 @@
|
|||||||
package org.elasticsearch.discovery.azure;
|
package org.elasticsearch.discovery.azure;
|
||||||
|
|
||||||
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
|
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
|
||||||
import org.elasticsearch.cloud.azure.AbstractAzureTest;
|
|
||||||
import org.elasticsearch.cloud.azure.AzureComputeService;
|
import org.elasticsearch.cloud.azure.AzureComputeService;
|
||||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
import org.elasticsearch.plugins.PluginsService;
|
||||||
|
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||||
|
|
||||||
public abstract class AbstractAzureComputeServiceTest extends AbstractAzureTest {
|
public abstract class AbstractAzureComputeServiceTest extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
private Class<? extends AzureComputeService> mock;
|
private Class<? extends AzureComputeService> mock;
|
||||||
|
|
||||||
@ -34,6 +35,14 @@ public abstract class AbstractAzureComputeServiceTest extends AbstractAzureTest
|
|||||||
this.mock = mock;
|
this.mock = mock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Settings nodeSettings(int nodeOrdinal) {
|
||||||
|
ImmutableSettings.Builder settings = ImmutableSettings.builder()
|
||||||
|
.put(super.nodeSettings(nodeOrdinal))
|
||||||
|
.put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, true);
|
||||||
|
return settings.build();
|
||||||
|
}
|
||||||
|
|
||||||
protected void checkNumberOfNodes(int expected) {
|
protected void checkNumberOfNodes(int expected) {
|
||||||
NodesInfoResponse nodeInfos = client().admin().cluster().prepareNodesInfo().execute().actionGet();
|
NodesInfoResponse nodeInfos = client().admin().cluster().prepareNodesInfo().execute().actionGet();
|
||||||
assertNotNull(nodeInfos);
|
assertNotNull(nodeInfos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user