Fix failing tests with elasticsearch 1.4.3
(cherry picked from commit 040e96f) (cherry picked from commit 13c83ce)
This commit is contained in:
parent
27546ecb16
commit
a8961d28c9
|
@ -60,13 +60,8 @@ public abstract class AbstractAzureComputeServiceTest extends ElasticsearchInteg
|
|||
.put("cloud.azure.keystore", "dummy")
|
||||
.put("cloud.azure.password", "dummy")
|
||||
.put("cloud.azure.service_name", "dummy")
|
||||
.put("cloud.azure.refresh_interval", "5s")
|
||||
// We need the network to make the mock working
|
||||
.put("node.mode", "network")
|
||||
// Make the tests run faster
|
||||
.put("discovery.zen.join.timeout", "100ms")
|
||||
.put("discovery.zen.ping.timeout", "10ms")
|
||||
.put("discovery.initial_state_timeout", "300ms");
|
||||
.put("node.mode", "network");
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
|
|
@ -47,8 +47,12 @@ public class AzureMinimumMasterNodesTest extends AbstractAzureComputeServiceTest
|
|||
@Override
|
||||
protected final Settings settingsBuilder() {
|
||||
ImmutableSettings.Builder builder = ImmutableSettings.settingsBuilder()
|
||||
.put(super.settingsBuilder())
|
||||
.put("discovery.zen.minimum_master_nodes", 2)
|
||||
.put(super.settingsBuilder());
|
||||
// Make the test run faster
|
||||
.put("discovery.zen.join.timeout", "50ms")
|
||||
.put("discovery.zen.ping.timeout", "10ms")
|
||||
.put("discovery.initial_state_timeout", "100ms");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ import org.elasticsearch.cloud.azure.AzureStorageServiceImpl;
|
|||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.base.Predicate;
|
||||
import org.elasticsearch.common.logging.ESLogger;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.SettingsFilter;
|
||||
|
@ -64,8 +62,6 @@ import static org.hamcrest.Matchers.greaterThan;
|
|||
transportClientRatio = 0.0)
|
||||
public class AzureSnapshotRestoreITest extends AbstractAzureTest {
|
||||
|
||||
private static ESLogger logger = ESLoggerFactory.getLogger(AzureSnapshotRestoreITest.class.getName());
|
||||
|
||||
private String getRepositoryPath() {
|
||||
String testName = "it-".concat(Strings.toUnderscoreCase(getTestName()).replaceAll("_", "-"));
|
||||
return testName.contains(" ") ? Strings.split(testName, " ")[0] : testName;
|
||||
|
@ -370,6 +366,7 @@ public class AzureSnapshotRestoreITest extends AbstractAzureTest {
|
|||
).get();
|
||||
client().admin().cluster().prepareDeleteRepository("test-repo").get();
|
||||
try {
|
||||
logger.info("--> remove container [{}]", container);
|
||||
cleanRepositoryFiles(container);
|
||||
} catch (StorageException | URISyntaxException e) {
|
||||
// We can ignore that as we just try to clean after the test
|
||||
|
@ -478,7 +475,6 @@ public class AzureSnapshotRestoreITest extends AbstractAzureTest {
|
|||
|
||||
AzureStorageService client = new AzureStorageServiceImpl(settings, settingsFilter);
|
||||
for (String container : containers) {
|
||||
logger.info("--> remove container [{}]", container);
|
||||
client.removeContainer(container);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue