Skip to content

Commit

Permalink
[ML] Fix failing TransformConfigUpdateTests test (elastic#98582)
Browse files Browse the repository at this point in the history
Use TransformConfigVersion string throughout.

Relates elastic#98577
  • Loading branch information
edsavage committed Aug 17, 2023
1 parent fbd5b09 commit 1465d47
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package org.elasticsearch.xpack.core.transform.transforms;

import org.elasticsearch.ElasticsearchStatusException;
import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.core.TimeValue;
Expand Down Expand Up @@ -142,7 +141,7 @@ public void testApply() {
randomMetadata(),
randomRetentionPolicyConfig(),
randomBoolean() ? null : Instant.now(),
randomBoolean() ? null : Version.V_7_2_0.toString()
randomBoolean() ? null : TransformConfigVersion.V_7_2_0.toString()
);
TransformConfigUpdate update = new TransformConfigUpdate(null, null, null, null, null, null, null, null);

Expand Down Expand Up @@ -240,7 +239,7 @@ public void testApplySettings() {
randomMetadata(),
randomRetentionPolicyConfig(),
randomBoolean() ? null : Instant.now(),
randomBoolean() ? null : Version.V_7_2_0.toString()
randomBoolean() ? null : TransformConfigVersion.V_7_2_0.toString()
);

TransformConfigUpdate update = new TransformConfigUpdate(
Expand Down Expand Up @@ -328,7 +327,7 @@ public void testApplyMetadata() {
oldMetadata,
randomRetentionPolicyConfig(),
randomBoolean() ? null : Instant.now(),
randomBoolean() ? null : Version.V_7_2_0.toString()
randomBoolean() ? null : TransformConfigVersion.V_7_2_0.toString()
);

Map<String, Object> newMetadata = Map.of("bar", 789, "baz", 1000);
Expand All @@ -354,7 +353,7 @@ public void testApplyWithSyncChange() {
randomMetadata(),
randomRetentionPolicyConfig(),
randomBoolean() ? null : Instant.now(),
randomBoolean() ? null : Version.CURRENT.toString()
randomBoolean() ? null : TransformConfigVersion.CURRENT.toString()
);

TransformConfigUpdate update = new TransformConfigUpdate(
Expand Down Expand Up @@ -388,7 +387,7 @@ public void testApplyWithSyncChange() {
randomMetadata(),
randomRetentionPolicyConfig(),
randomBoolean() ? null : Instant.now(),
randomBoolean() ? null : Version.CURRENT.toString()
randomBoolean() ? null : TransformConfigVersion.CURRENT.toString()
);

TransformConfigUpdate fooSyncUpdate = new TransformConfigUpdate(null, null, null, new FooSync(), null, null, null, null);
Expand Down

0 comments on commit 1465d47

Please sign in to comment.