Skip to content

Commit a1c3cdc

Browse files
committed
Add writeable entry to ML tests
1 parent be4b635 commit a1c3cdc

File tree

1 file changed

+21
-0
lines changed
  • x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration

1 file changed

+21
-0
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.elasticsearch.action.support.master.AcknowledgedResponse;
2121
import org.elasticsearch.client.internal.Client;
2222
import org.elasticsearch.client.internal.node.NodeClient;
23+
import org.elasticsearch.cluster.AbstractNamedDiffable;
2324
import org.elasticsearch.cluster.ClusterModule;
2425
import org.elasticsearch.cluster.ClusterState;
2526
import org.elasticsearch.cluster.NamedDiff;
@@ -59,6 +60,7 @@
5960
import org.elasticsearch.test.XContentTestUtils;
6061
import org.elasticsearch.transport.netty4.Netty4Plugin;
6162
import org.elasticsearch.xcontent.NamedXContentRegistry;
63+
import org.elasticsearch.xcontent.ParseField;
6264
import org.elasticsearch.xpack.autoscaling.Autoscaling;
6365
import org.elasticsearch.xpack.autoscaling.AutoscalingMetadata;
6466
import org.elasticsearch.xpack.autoscaling.capacity.AutoscalingDeciderResult;
@@ -99,6 +101,7 @@
99101
import org.elasticsearch.xpack.esql.core.plugin.EsqlCorePlugin;
100102
import org.elasticsearch.xpack.esql.plugin.EsqlPlugin;
101103
import org.elasticsearch.xpack.ilm.IndexLifecycle;
104+
import org.elasticsearch.xpack.inference.registry.ClearInferenceEndpointCacheAction;
102105
import org.elasticsearch.xpack.inference.registry.ModelRegistryMetadata;
103106
import org.elasticsearch.xpack.ml.LocalStateMachineLearning;
104107
import org.elasticsearch.xpack.ml.autoscaling.MlScalingReason;
@@ -436,6 +439,24 @@ protected void assertClusterRoundTrip() throws IOException {
436439
new NamedWriteableRegistry.Entry(Metadata.ProjectCustom.class, ModelRegistryMetadata.TYPE, ModelRegistryMetadata::new)
437440
);
438441
entries.add(new NamedWriteableRegistry.Entry(NamedDiff.class, ModelRegistryMetadata.TYPE, ModelRegistryMetadata::readDiffFrom));
442+
entries.add(
443+
new NamedWriteableRegistry.Entry(
444+
Metadata.ProjectCustom.class,
445+
ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME,
446+
ClearInferenceEndpointCacheAction.InvalidateCacheMetadata::new
447+
)
448+
);
449+
entries.add(
450+
new NamedWriteableRegistry.Entry(
451+
NamedDiff.class,
452+
ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME,
453+
in -> AbstractNamedDiffable.readDiffFrom(
454+
Metadata.ProjectCustom.class,
455+
ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME,
456+
in
457+
)
458+
)
459+
);
439460

440461
// Retrieve the cluster state from a random node, and serialize and deserialize it.
441462
final ClusterStateResponse clusterStateResponse = client().admin()

0 commit comments

Comments
 (0)