Cut over some remaining integration tests to IT
A few subclasses got missed here
This commit is contained in:
parent
3867e43196
commit
062feac80a
|
@ -39,7 +39,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
|
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
|
@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
|
||||||
public class BasicAnalysisBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class BasicAnalysisBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
// This pattern match characters with Line_Break = Complex_Content.
|
// This pattern match characters with Line_Break = Complex_Content.
|
||||||
final static Pattern complexUnicodeChars = Pattern.compile("[\u17B4\u17B5\u17D3\u17CB-\u17D1\u17DD\u1036\u17C6\u1A74\u1038\u17C7\u0E4E\u0E47-\u0E4D\u0EC8-\u0ECD\uAABF\uAAC1\u1037\u17C8-\u17CA\u1A75-\u1A7C\u1AA8-\u1AAB\uAADE\uAADF\u1AA0-\u1AA6\u1AAC\u1AAD\u109E\u109F\uAA77-\uAA79\u0E46\u0EC6\u17D7\u1AA7\uA9E6\uAA70\uAADD\u19DA\u0E01-\u0E3A\u0E40-\u0E45\u0EDE\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0EDF\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAB\u0EDC\u0EDD\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\uAA80-\uAABE\uAAC0\uAAC2\uAADB\uAADC\u1000\u1075\u1001\u1076\u1002\u1077\uAA60\uA9E9\u1003\uA9E0\uA9EA\u1004\u105A\u1005\u1078\uAA61\u1006\uA9E1\uAA62\uAA7E\u1007\uAA63\uA9EB\u1079\uAA72\u1008\u105B\uA9E2\uAA64\uA9EC\u1061\uAA7F\u1009\u107A\uAA65\uA9E7\u100A\u100B\uAA66\u100C\uAA67\u100D\uAA68\uA9ED\u100E\uAA69\uA9EE\u100F\u106E\uA9E3\uA9EF\u1010-\u1012\u107B\uA9FB\u1013\uAA6A\uA9FC\u1014\u107C\uAA6B\u105E\u1015\u1016\u107D\u107E\uAA6F\u108E\uA9E8\u1017\u107F\uA9FD\u1018\uA9E4\uA9FE\u1019\u105F\u101A\u103B\u101B\uAA73\uAA7A\u103C\u101C\u1060\u101D\u103D\u1082\u1080\u1050\u1051\u1065\u101E\u103F\uAA6C\u101F\u1081\uAA6D\u103E\uAA6E\uAA71\u1020\uA9FA\u105C\u105D\u106F\u1070\u1066\u1021-\u1026\u1052-\u1055\u1027-\u102A\u102C\u102B\u1083\u1072\u109C\u102D\u1071\u102E\u1033\u102F\u1073\u1074\u1030\u1056-\u1059\u1031\u1084\u1035\u1085\u1032\u109D\u1034\u1062\u1067\u1068\uA9E5\u1086\u1039\u103A\u1063\u1064\u1069-\u106D\u1087\u108B\u1088\u108C\u108D\u1089\u108A\u108F\u109A\u109B\uAA7B-\uAA7D\uAA74-\uAA76\u1780-\u17A2\u17DC\u17A3-\u17B3\u17B6-\u17C5\u17D2\u1950-\u196D\u1970-\u1974\u1980-\u199C\u19DE\u19DF\u199D-\u19AB\u19B0-\u19C9\u1A20-\u1A26\u1A58\u1A59\u1A27-\u1A3B\u1A5A\u1A5B\u1A3C-\u1A46\u1A54\u1A47-\u1A4C\u1A53\u1A6B\u1A55-\u1A57\u1A5C-\u1A5E\u1A4D-\u1A52\u1A61\u1A6C\u1A62-\u1A6A\u1A6E\u1A6F\u1A73\u1A70-\u1A72\u1A6D\u1A60]");
|
final static Pattern complexUnicodeChars = Pattern.compile("[\u17B4\u17B5\u17D3\u17CB-\u17D1\u17DD\u1036\u17C6\u1A74\u1038\u17C7\u0E4E\u0E47-\u0E4D\u0EC8-\u0ECD\uAABF\uAAC1\u1037\u17C8-\u17CA\u1A75-\u1A7C\u1AA8-\u1AAB\uAADE\uAADF\u1AA0-\u1AA6\u1AAC\u1AAD\u109E\u109F\uAA77-\uAA79\u0E46\u0EC6\u17D7\u1AA7\uA9E6\uAA70\uAADD\u19DA\u0E01-\u0E3A\u0E40-\u0E45\u0EDE\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0EDF\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAB\u0EDC\u0EDD\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\uAA80-\uAABE\uAAC0\uAAC2\uAADB\uAADC\u1000\u1075\u1001\u1076\u1002\u1077\uAA60\uA9E9\u1003\uA9E0\uA9EA\u1004\u105A\u1005\u1078\uAA61\u1006\uA9E1\uAA62\uAA7E\u1007\uAA63\uA9EB\u1079\uAA72\u1008\u105B\uA9E2\uAA64\uA9EC\u1061\uAA7F\u1009\u107A\uAA65\uA9E7\u100A\u100B\uAA66\u100C\uAA67\u100D\uAA68\uA9ED\u100E\uAA69\uA9EE\u100F\u106E\uA9E3\uA9EF\u1010-\u1012\u107B\uA9FB\u1013\uAA6A\uA9FC\u1014\u107C\uAA6B\u105E\u1015\u1016\u107D\u107E\uAA6F\u108E\uA9E8\u1017\u107F\uA9FD\u1018\uA9E4\uA9FE\u1019\u105F\u101A\u103B\u101B\uAA73\uAA7A\u103C\u101C\u1060\u101D\u103D\u1082\u1080\u1050\u1051\u1065\u101E\u103F\uAA6C\u101F\u1081\uAA6D\u103E\uAA6E\uAA71\u1020\uA9FA\u105C\u105D\u106F\u1070\u1066\u1021-\u1026\u1052-\u1055\u1027-\u102A\u102C\u102B\u1083\u1072\u109C\u102D\u1071\u102E\u1033\u102F\u1073\u1074\u1030\u1056-\u1059\u1031\u1084\u1035\u1085\u1032\u109D\u1034\u1062\u1067\u1068\uA9E5\u1086\u1039\u103A\u1063\u1064\u1069-\u106D\u1087\u108B\u1088\u108C\u108D\u1089\u108A\u108F\u109A\u109B\uAA7B-\uAA7D\uAA74-\uAA76\u1780-\u17A2\u17DC\u17A3-\u17B3\u17B6-\u17C5\u17D2\u1950-\u196D\u1970-\u1974\u1980-\u199C\u19DE\u19DF\u199D-\u19AB\u19B0-\u19C9\u1A20-\u1A26\u1A58\u1A59\u1A27-\u1A3B\u1A5A\u1A5B\u1A3C-\u1A46\u1A54\u1A47-\u1A4C\u1A53\u1A6B\u1A55-\u1A57\u1A5C-\u1A5E\u1A4D-\u1A52\u1A61\u1A6C\u1A62-\u1A6A\u1A6E\u1A6F\u1A73\u1A70-\u1A72\u1A6D\u1A60]");
|
|
@ -76,7 +76,7 @@ import static org.hamcrest.Matchers.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class BasicBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic test using Index & Realtime Get with external versioning. This test ensures routing works correctly across versions.
|
* Basic test using Index & Realtime Get with external versioning. This test ensures routing works correctly across versions.
|
|
@ -38,7 +38,7 @@ import java.util.Map;
|
||||||
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
|
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
|
|
||||||
public class ClusterStateBackwardsCompatTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class ClusterStateBackwardsCompatIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testClusterState() throws Exception {
|
public void testClusterState() throws Exception {
|
|
@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.anyOf;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.notNullValue;
|
import static org.hamcrest.Matchers.notNullValue;
|
||||||
|
|
||||||
public class GetIndexBackwardsCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class GetIndexBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetAliases() throws Exception {
|
public void testGetAliases() throws Exception {
|
|
@ -33,7 +33,7 @@ import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(scope= ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0)
|
@ElasticsearchIntegrationTest.ClusterScope(scope= ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0)
|
||||||
public class NodesStatsBasicBackwardsCompatTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class NodesStatsBasicBackwardsCompatIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNodeStatsSetIndices() throws Exception {
|
public void testNodeStatsSetIndices() throws Exception {
|
|
@ -43,7 +43,7 @@ import org.elasticsearch.index.engine.EngineConfig;
|
||||||
import org.elasticsearch.index.query.QueryBuilders;
|
import org.elasticsearch.index.query.QueryBuilders;
|
||||||
import org.elasticsearch.index.shard.MergePolicyConfig;
|
import org.elasticsearch.index.shard.MergePolicyConfig;
|
||||||
import org.elasticsearch.indices.recovery.RecoverySettings;
|
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||||
import org.elasticsearch.rest.action.admin.indices.upgrade.UpgradeTest;
|
import org.elasticsearch.rest.action.admin.indices.upgrade.UpgradeIT;
|
||||||
import org.elasticsearch.search.SearchHit;
|
import org.elasticsearch.search.SearchHit;
|
||||||
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
||||||
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
|
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
|
||||||
|
@ -436,10 +436,10 @@ public class OldIndexBackwardsCompatibilityIT extends ElasticsearchIntegrationTe
|
||||||
|
|
||||||
void assertUpgradeWorks(String indexName, boolean alreadyLatest) throws Exception {
|
void assertUpgradeWorks(String indexName, boolean alreadyLatest) throws Exception {
|
||||||
if (alreadyLatest == false) {
|
if (alreadyLatest == false) {
|
||||||
UpgradeTest.assertNotUpgraded(client(), indexName);
|
UpgradeIT.assertNotUpgraded(client(), indexName);
|
||||||
}
|
}
|
||||||
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).get());
|
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).get());
|
||||||
UpgradeTest.assertUpgraded(client(), indexName);
|
UpgradeIT.assertUpgraded(client(), indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
|
|
||||||
public class RecoveryWithUnsupportedIndicesTests extends StaticIndexBackwardCompatibilityTest {
|
public class RecoveryWithUnsupportedIndicesIT extends StaticIndexBackwardCompatibilityIT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpgradeStartClusterOn_0_20_6() throws Exception {
|
public void testUpgradeStartClusterOn_0_20_6() throws Exception {
|
|
@ -29,7 +29,7 @@ import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
|
||||||
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
|
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.rest.RestStatus;
|
import org.elasticsearch.rest.RestStatus;
|
||||||
import org.elasticsearch.snapshots.AbstractSnapshotTests;
|
import org.elasticsearch.snapshots.AbstractSnapshotIT;
|
||||||
import org.elasticsearch.snapshots.RestoreInfo;
|
import org.elasticsearch.snapshots.RestoreInfo;
|
||||||
import org.elasticsearch.snapshots.SnapshotInfo;
|
import org.elasticsearch.snapshots.SnapshotInfo;
|
||||||
import org.elasticsearch.snapshots.SnapshotRestoreException;
|
import org.elasticsearch.snapshots.SnapshotRestoreException;
|
||||||
|
@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.*;
|
||||||
|
|
||||||
@Slow
|
@Slow
|
||||||
@ClusterScope(scope = Scope.TEST)
|
@ClusterScope(scope = Scope.TEST)
|
||||||
public class RestoreBackwardsCompatTests extends AbstractSnapshotTests {
|
public class RestoreBackwardsCompatTests extends AbstractSnapshotIT {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Settings nodeSettings(int nodeOrdinal) {
|
protected Settings nodeSettings(int nodeOrdinal) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||||
*/
|
*/
|
||||||
@LuceneTestCase.SuppressCodecs("*")
|
@LuceneTestCase.SuppressCodecs("*")
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
|
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
|
||||||
public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrationTest {
|
public class StaticIndexBackwardCompatibilityIT extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
public void loadIndex(String index, Object... settings) throws Exception {
|
public void loadIndex(String index, Object... settings) throws Exception {
|
||||||
logger.info("Checking static index " + index);
|
logger.info("Checking static index " + index);
|
|
@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
|
||||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
|
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
|
||||||
import static org.hamcrest.CoreMatchers.equalTo;
|
import static org.hamcrest.CoreMatchers.equalTo;
|
||||||
|
|
||||||
public class TransportClientBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class TransportClientBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSniffMode() throws ExecutionException, InterruptedException {
|
public void testSniffMode() throws ExecutionException, InterruptedException {
|
|
@ -26,7 +26,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
|
|
||||||
public class UnicastBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class UnicastBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Settings nodeSettings(int nodeOrdinal) {
|
protected Settings nodeSettings(int nodeOrdinal) {
|
|
@ -26,7 +26,7 @@ import static org.elasticsearch.client.Requests.createIndexRequest;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AliasedIndexDocumentActionsTests extends DocumentActionsIT {
|
public class AliasedIndexDocumentActionsIT extends DocumentActionsIT {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createIndex() {
|
protected void createIndex() {
|
|
@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.greaterThan;
|
import static org.hamcrest.Matchers.greaterThan;
|
||||||
|
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.TEST, numClientNodes = 0, transportClientRatio = 0.0)
|
@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.TEST, numClientNodes = 0, transportClientRatio = 0.0)
|
||||||
public class RecoveryBackwardsCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class RecoveryBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -31,7 +31,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
|
||||||
*/
|
*/
|
||||||
@Slow
|
@Slow
|
||||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||||
public class DedicatedMasterGetFieldMappingTests extends SimpleGetFieldMappingsIT {
|
public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before1() throws Exception {
|
public void before1() throws Exception {
|
|
@ -48,7 +48,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
|
||||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||||
|
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) // test scope since we set cluster wide settings
|
@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) // test scope since we set cluster wide settings
|
||||||
public class UpgradeTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class UpgradeIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void checkUpgradeVersion() {
|
public static void checkUpgradeVersion() {
|
||||||
|
@ -235,7 +235,7 @@ public class UpgradeTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isUpgraded(Client client, String index) throws Exception {
|
static boolean isUpgraded(Client client, String index) throws Exception {
|
||||||
ESLogger logger = Loggers.getLogger(UpgradeTest.class);
|
ESLogger logger = Loggers.getLogger(UpgradeIT.class);
|
||||||
int toUpgrade = 0;
|
int toUpgrade = 0;
|
||||||
for (IndexUpgradeStatus status : getUpgradeStatus(client, index)) {
|
for (IndexUpgradeStatus status : getUpgradeStatus(client, index)) {
|
||||||
logger.info("Index: " + status.getIndex() + ", total: " + status.getTotalBytes() + ", toUpgrade: " + status.getToUpgradeBytes());
|
logger.info("Index: " + status.getIndex() + ", total: " + status.getTotalBytes() + ", toUpgrade: " + status.getToUpgradeBytes());
|
|
@ -20,27 +20,27 @@
|
||||||
package org.elasticsearch.rest.action.admin.indices.upgrade;
|
package org.elasticsearch.rest.action.admin.indices.upgrade;
|
||||||
|
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.bwcompat.StaticIndexBackwardCompatibilityTest;
|
import org.elasticsearch.bwcompat.StaticIndexBackwardCompatibilityIT;
|
||||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||||
import org.elasticsearch.index.IndexService;
|
import org.elasticsearch.index.IndexService;
|
||||||
import org.elasticsearch.indices.IndicesService;
|
import org.elasticsearch.indices.IndicesService;
|
||||||
|
|
||||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||||
|
|
||||||
public class UpgradeReallyOldIndexTest extends StaticIndexBackwardCompatibilityTest {
|
public class UpgradeReallyOldIndexIT extends StaticIndexBackwardCompatibilityIT {
|
||||||
|
|
||||||
public void testUpgrade_0_90_6() throws Exception {
|
public void testUpgrade_0_90_6() throws Exception {
|
||||||
String indexName = "index-0.90.6";
|
String indexName = "index-0.90.6";
|
||||||
|
|
||||||
loadIndex(indexName);
|
loadIndex(indexName);
|
||||||
assertMinVersion(indexName, org.apache.lucene.util.Version.parse("4.5.1"));
|
assertMinVersion(indexName, org.apache.lucene.util.Version.parse("4.5.1"));
|
||||||
UpgradeTest.assertNotUpgraded(client(), indexName);
|
UpgradeIT.assertNotUpgraded(client(), indexName);
|
||||||
assertTrue(UpgradeTest.hasAncientSegments(client(), indexName));
|
assertTrue(UpgradeIT.hasAncientSegments(client(), indexName));
|
||||||
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).setUpgradeOnlyAncientSegments(true).get());
|
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).setUpgradeOnlyAncientSegments(true).get());
|
||||||
|
|
||||||
assertFalse(UpgradeTest.hasAncientSegments(client(), "index-0.90.6"));
|
assertFalse(UpgradeIT.hasAncientSegments(client(), "index-0.90.6"));
|
||||||
// This index has only ancient segments, so it should now be fully upgraded:
|
// This index has only ancient segments, so it should now be fully upgraded:
|
||||||
UpgradeTest.assertUpgraded(client(), indexName);
|
UpgradeIT.assertUpgraded(client(), indexName);
|
||||||
assertEquals(Version.CURRENT.luceneVersion.toString(), client().admin().indices().prepareGetSettings(indexName).get().getSetting(indexName, IndexMetaData.SETTING_VERSION_MINIMUM_COMPATIBLE));
|
assertEquals(Version.CURRENT.luceneVersion.toString(), client().admin().indices().prepareGetSettings(indexName).get().getSetting(indexName, IndexMetaData.SETTING_VERSION_MINIMUM_COMPATIBLE));
|
||||||
assertMinVersion(indexName, Version.CURRENT.luceneVersion);
|
assertMinVersion(indexName, Version.CURRENT.luceneVersion);
|
||||||
}
|
}
|
|
@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class SignificantTermsBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class SignificantTermsBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
static final String INDEX_NAME = "testidx";
|
static final String INDEX_NAME = "testidx";
|
||||||
static final String DOC_TYPE = "doc";
|
static final String DOC_TYPE = "doc";
|
|
@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class FunctionScoreBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple upgrade test for function score
|
* Simple upgrade test for function score
|
|
@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Ignore
|
||||||
public abstract class AbstractSnapshotTests extends ElasticsearchIntegrationTest {
|
public abstract class AbstractSnapshotIT extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
public static long getFailureCount(String repository) {
|
public static long getFailureCount(String repository) {
|
||||||
long failureCount = 0;
|
long failureCount = 0;
|
|
@ -49,7 +49,7 @@ import java.util.concurrent.*;
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
import static org.hamcrest.Matchers.greaterThan;
|
import static org.hamcrest.Matchers.greaterThan;
|
||||||
|
|
||||||
public class BlobStoreFormatTests extends AbstractSnapshotTests {
|
public class BlobStoreFormatTests extends AbstractSnapshotIT {
|
||||||
|
|
||||||
private static final ParseFieldMatcher parseFieldMatcher = new ParseFieldMatcher(Settings.EMPTY);
|
private static final ParseFieldMatcher parseFieldMatcher = new ParseFieldMatcher(Settings.EMPTY);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ import static org.hamcrest.Matchers.*;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||||
public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
|
public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void restorePersistentSettingsTest() throws Exception {
|
public void restorePersistentSettingsTest() throws Exception {
|
|
@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.notNullValue;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
|
@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
|
||||||
public class RepositoriesTests extends AbstractSnapshotTests {
|
public class RepositoriesTests extends AbstractSnapshotIT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRepositoryCreation() throws Exception {
|
public void testRepositoryCreation() throws Exception {
|
||||||
|
|
|
@ -80,7 +80,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
|
||||||
import static org.hamcrest.Matchers.*;
|
import static org.hamcrest.Matchers.*;
|
||||||
|
|
||||||
@Slow
|
@Slow
|
||||||
public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
|
public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void basicWorkFlowTest() throws Exception {
|
public void basicWorkFlowTest() throws Exception {
|
|
@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.greaterThan;
|
import static org.hamcrest.Matchers.greaterThan;
|
||||||
import static org.hamcrest.Matchers.lessThan;
|
import static org.hamcrest.Matchers.lessThan;
|
||||||
|
|
||||||
public class SnapshotBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
|
public class SnapshotBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSnapshotAndRestore() throws ExecutionException, InterruptedException, IOException {
|
public void testSnapshotAndRestore() throws ExecutionException, InterruptedException, IOException {
|
Loading…
Reference in New Issue