Fix non integration tests

With change #24, non integration can not run anymore.

(cherry picked from commit 76eecc8)
This commit is contained in:
David Pilato 2014-08-02 15:46:56 +02:00
parent 45492c009c
commit 88ddd31d0b
1 changed files with 11 additions and 2 deletions

View File

@ -20,12 +20,13 @@
package org.elasticsearch.discovery.azure;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.cloud.azure.AbstractAzureTest;
import org.elasticsearch.cloud.azure.AzureComputeService;
import org.elasticsearch.common.settings.ImmutableSettings;
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;
@ -34,6 +35,14 @@ public abstract class AbstractAzureComputeServiceTest extends AbstractAzureTest
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) {
NodesInfoResponse nodeInfos = client().admin().cluster().prepareNodesInfo().execute().actionGet();
assertNotNull(nodeInfos);