Skip to content

Commit

Permalink
[ML] fix failing TransformPersistentTasksExecutorTests (elastic#98575)
Browse files Browse the repository at this point in the history
Update test nodes with an appropriate value for the TRANSFORM_CONFIG_VERSION_NODE_ATTR attribute

Relates elastic#98564
  • Loading branch information
edsavage authored and csoulios committed Aug 18, 2023
1 parent f8464cf commit 58a5055
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

public class TransformPersistentTasksExecutorTests extends ESTestCase {

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/98564")
public void testNodeVersionAssignment() {
DiscoveryNodes.Builder nodes = buildNodes(false, true, true, true, true);
ClusterState cs = buildClusterState(nodes);
Expand Down Expand Up @@ -90,7 +89,6 @@ public void testNodeVersionAssignment() {
);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/98564")
public void testNodeAssignmentProblems() {
// no data nodes
DiscoveryNodes.Builder nodes = buildNodes(false, false, false, false, true);
Expand Down Expand Up @@ -307,6 +305,9 @@ private DiscoveryNodes.Builder buildNodes(
DiscoveryNodeRole.TRANSFORM_ROLE
)
)
.attributes(
Map.of(TransformConfigVersion.TRANSFORM_CONFIG_VERSION_NODE_ATTR, TransformConfigVersion.CURRENT.toString())
)
.build()
);
}
Expand Down Expand Up @@ -336,6 +337,9 @@ private DiscoveryNodes.Builder buildNodes(
.roles(
Set.of(DiscoveryNodeRole.DATA_ROLE, DiscoveryNodeRole.REMOTE_CLUSTER_CLIENT_ROLE, DiscoveryNodeRole.TRANSFORM_ROLE)
)
.attributes(
Map.of(TransformConfigVersion.TRANSFORM_CONFIG_VERSION_NODE_ATTR, TransformConfigVersion.CURRENT.toString())
)
.build()
)
.add(
Expand All @@ -347,6 +351,9 @@ private DiscoveryNodes.Builder buildNodes(
DiscoveryNodeRole.TRANSFORM_ROLE
)
)
.attributes(
Map.of(TransformConfigVersion.TRANSFORM_CONFIG_VERSION_NODE_ATTR, TransformConfigVersion.CURRENT.toString())
)
.build()
);
}
Expand All @@ -355,6 +362,9 @@ private DiscoveryNodes.Builder buildNodes(
nodes.add(
DiscoveryNodeUtils.builder("current-data-node-with-0-tasks-transform-remote-disabled")
.roles(Set.of(DiscoveryNodeRole.DATA_ROLE, DiscoveryNodeRole.MASTER_ROLE, DiscoveryNodeRole.TRANSFORM_ROLE))
.attributes(
Map.of(TransformConfigVersion.TRANSFORM_CONFIG_VERSION_NODE_ATTR, TransformConfigVersion.CURRENT.toString())
)
.build()
);
}
Expand All @@ -363,6 +373,9 @@ private DiscoveryNodes.Builder buildNodes(
nodes.add(
DiscoveryNodeUtils.builder("current-data-node-with-transform-disabled")
.roles(Set.of(DiscoveryNodeRole.DATA_ROLE, DiscoveryNodeRole.MASTER_ROLE, DiscoveryNodeRole.REMOTE_CLUSTER_CLIENT_ROLE))
.attributes(
Map.of(TransformConfigVersion.TRANSFORM_CONFIG_VERSION_NODE_ATTR, TransformConfigVersion.CURRENT.toString())
)
.build()
);
}
Expand Down

0 comments on commit 58a5055

Please sign in to comment.