|
@@ -9,7 +9,6 @@ import org.apache.http.util.EntityUtils;
|
|
import org.elasticsearch.Version;
|
|
import org.elasticsearch.Version;
|
|
import org.elasticsearch.client.Request;
|
|
import org.elasticsearch.client.Request;
|
|
import org.elasticsearch.client.Response;
|
|
import org.elasticsearch.client.Response;
|
|
-import org.elasticsearch.cluster.DataStreamTestHelper;
|
|
|
|
import org.elasticsearch.cluster.metadata.DataStream;
|
|
import org.elasticsearch.cluster.metadata.DataStream;
|
|
import org.elasticsearch.common.Booleans;
|
|
import org.elasticsearch.common.Booleans;
|
|
import org.hamcrest.Matchers;
|
|
import org.hamcrest.Matchers;
|
|
@@ -66,7 +65,7 @@ public class DataStreamsUpgradeIT extends AbstractUpgradeTestCase {
|
|
if (Booleans.parseBoolean(System.getProperty("tests.first_round"))) {
|
|
if (Booleans.parseBoolean(System.getProperty("tests.first_round"))) {
|
|
// include legacy name and date-named indices with today +/-1 in case of clock skew
|
|
// include legacy name and date-named indices with today +/-1 in case of clock skew
|
|
var expectedIndices = List.of(
|
|
var expectedIndices = List.of(
|
|
- "{\"_index\":\"" + DataStreamTestHelper.getLegacyDefaultBackingIndexName("logs-foobar", 2) + "\"}",
|
|
|
|
|
|
+ "{\"_index\":\"" + DataStream.getLegacyDefaultBackingIndexName("logs-foobar", 2) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis + 86400000) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis + 86400000) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis - 86400000) + "\"}"
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 2, nowMillis - 86400000) + "\"}"
|
|
@@ -77,7 +76,7 @@ public class DataStreamsUpgradeIT extends AbstractUpgradeTestCase {
|
|
} else {
|
|
} else {
|
|
// include legacy name and date-named indices with today +/-1 in case of clock skew
|
|
// include legacy name and date-named indices with today +/-1 in case of clock skew
|
|
var expectedIndices = List.of(
|
|
var expectedIndices = List.of(
|
|
- "{\"_index\":\"" + DataStreamTestHelper.getLegacyDefaultBackingIndexName("logs-foobar", 3) + "\"}",
|
|
|
|
|
|
+ "{\"_index\":\"" + DataStream.getLegacyDefaultBackingIndexName("logs-foobar", 3) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis + 86400000) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis + 86400000) + "\"}",
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis - 86400000) + "\"}"
|
|
"{\"_index\":\"" + DataStream.getDefaultBackingIndexName("logs-foobar", 3, nowMillis - 86400000) + "\"}"
|