Skip to content

Commit

Permalink
Update version skips and constants after backport
Browse files Browse the repository at this point in the history
After elastic#41906 was
backported, we need to update the various test skips and version
constants
  • Loading branch information
polyfractal committed May 21, 2019
1 parent e126d18 commit 02cd4b6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ setup:
---
"Composite aggregation with format":
- skip:
version: " - 7.99.99" #TODO change this after backport
version: " - 7.1.99"
reason: calendar_interval introduced in 7.2.0
features: warnings

Expand Down Expand Up @@ -307,7 +307,7 @@ setup:
---
"Composite aggregation with format and calendar_interval":
- skip:
version: " - 7.99.99" #TODO change this after backport
version: " - 7.1.99"
reason: calendar_interval introduced in 7.2.0

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Bad window":

- skip:
version: " - 7.99.0" #TODO change this after backport
version: " - 7.1.99"
reason: "calendar_interval added in 7.2"

- do:
Expand Down Expand Up @@ -30,7 +30,7 @@
"Bad window deprecated interval":

- skip:
version: " - 7.99.0" #TODO change this after backport
version: " - 7.1.99"
reason: "interval deprecation added in 7.2"
features: "warnings"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ setup:
---
"Test typed keys parameter for date_histogram aggregation and max_bucket pipeline aggregation":
- skip:
version: " - 7.99.0" #TODO change this after backport
version: " - 7.1.99"
reason: "calendar_interval added in 7.2"
- do:
search:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ setup:
---
"date histogram aggregation with date and date_nanos mapping":
- skip:
version: " - 7.99.99" #TODO change this after backport
version: " - 7.1.99"
reason: calendar_interval introduced in 7.2.0

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static <T extends DateIntervalConsumer> void declareIntervalFields(Object
public DateIntervalWrapper() {}

public DateIntervalWrapper(StreamInput in) throws IOException {
if (in.getVersion().before(Version.V_8_0_0)) { // TODO change this after backport
if (in.getVersion().before(Version.V_7_2_0)) {
long interval = in.readLong();
DateHistogramInterval histoInterval = in.readOptionalWriteable(DateHistogramInterval::new);

Expand Down Expand Up @@ -374,7 +374,7 @@ public boolean isEmpty() {

@Override
public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().before(Version.V_8_0_0)) { // TODO change this after backport
if (out.getVersion().before(Version.V_7_2_0)) {
if (intervalType.equals(IntervalTypeEnum.LEGACY_INTERVAL)) {
out.writeLong(TimeValue.parseTimeValue(dateHistogramInterval.toString(),
DateHistogramAggregationBuilder.NAME + ".innerWriteTo").getMillis());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void testRollupAfterRestart() throws Exception {
final Request createRollupJobRequest = new Request("PUT", getRollupEndpoint() + "/job/rollup-job-test");

String intervalType;
if (getOldClusterVersion().onOrAfter(Version.V_8_0_0)) { // TODO change this after backport
if (getOldClusterVersion().onOrAfter(Version.V_7_2_0)) {
intervalType = "fixed_interval";
} else {
intervalType = "interval";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class RollupDateHistoUpgradeIT extends AbstractUpgradeTestCase {
Version.fromString(System.getProperty("tests.upgrade_from_version"));

public void testDateHistoIntervalUpgrade() throws Exception {
assumeTrue("DateHisto interval changed in 7.1", UPGRADE_FROM_VERSION.before(Version.V_7_2_0));
assumeTrue("DateHisto interval changed in 7.2", UPGRADE_FROM_VERSION.before(Version.V_7_2_0));
switch (CLUSTER_TYPE) {
case OLD:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
- do:
warnings:
- '[interval] on [date_histogram] is deprecated, use [fixed_interval] or [calendar_interval] in the future.'
- '[interval] on [date_histogram] is deprecated, use [fixed_interval] or [calendar_interval] in the future.'
ml.put_datafeed:
datafeed_id: mixed-cluster-datafeed-with-aggs
body: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
---
"Put job and datafeed with aggs in old cluster - pre-deprecated interval":
- skip:
version: "all" #TODO change this after backport
reason: "AwaitsFix https://github.com/elastic/elasticsearch/issues/42258; calendar_interval introduced in 7.2.0"
version: "7.1.99 - "
reason: "calendar_interval introduced in 7.2.0"

- do:
ml.put_job:
Expand Down Expand Up @@ -118,8 +118,8 @@
---
"Put job and datafeed with aggs in old cluster - deprecated interval with warning":
- skip:
version: " - 7.99.99" #TODO change this after backport
reason: calendar_interval introduced in 7.1.0
version: " - 7.1.99"
reason: calendar_interval introduced in 7.2.0
features: warnings

- do:
Expand Down

0 comments on commit 02cd4b6

Please sign in to comment.