|
7 | 7 |
|
8 | 8 | package org.elasticsearch.xpack.inference.services.huggingface.completion; |
9 | 9 |
|
| 10 | +import org.elasticsearch.TransportVersion; |
10 | 11 | import org.elasticsearch.common.Strings; |
11 | 12 | import org.elasticsearch.common.ValidationException; |
12 | 13 | import org.elasticsearch.common.io.stream.Writeable; |
13 | | -import org.elasticsearch.test.AbstractWireSerializingTestCase; |
14 | 14 | import org.elasticsearch.xcontent.XContentBuilder; |
15 | 15 | import org.elasticsearch.xcontent.XContentFactory; |
16 | 16 | import org.elasticsearch.xcontent.XContentType; |
| 17 | +import org.elasticsearch.xpack.core.ml.AbstractBWCWireSerializationTestCase; |
17 | 18 | import org.elasticsearch.xpack.inference.services.ConfigurationParseContext; |
18 | 19 | import org.elasticsearch.xpack.inference.services.ServiceFields; |
19 | 20 | import org.elasticsearch.xpack.inference.services.ServiceUtils; |
|
27 | 28 | import static org.hamcrest.Matchers.containsString; |
28 | 29 | import static org.hamcrest.Matchers.is; |
29 | 30 |
|
30 | | -public class HuggingFaceChatCompletionServiceSettingsTests extends AbstractWireSerializingTestCase< |
| 31 | +public class HuggingFaceChatCompletionServiceSettingsTests extends AbstractBWCWireSerializationTestCase< |
31 | 32 | HuggingFaceChatCompletionServiceSettings> { |
32 | 33 |
|
33 | 34 | public static final String MODEL_ID = "some model"; |
@@ -226,6 +227,14 @@ protected HuggingFaceChatCompletionServiceSettings mutateInstance(HuggingFaceCha |
226 | 227 | return randomValueOtherThan(instance, HuggingFaceChatCompletionServiceSettingsTests::createRandomWithNonNullUrl); |
227 | 228 | } |
228 | 229 |
|
| 230 | + @Override |
| 231 | + protected HuggingFaceChatCompletionServiceSettings mutateInstanceForVersion( |
| 232 | + HuggingFaceChatCompletionServiceSettings instance, |
| 233 | + TransportVersion version |
| 234 | + ) { |
| 235 | + return instance; |
| 236 | + } |
| 237 | + |
229 | 238 | private static HuggingFaceChatCompletionServiceSettings createRandomWithNonNullUrl() { |
230 | 239 | return createRandom(randomAlphaOfLength(15)); |
231 | 240 | } |
|
0 commit comments