Skip to content

Commit a3350b8

Browse files
committed
Fix test
1 parent 494203f commit a3350b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/InferenceProcessorTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222
public class InferenceProcessorTests extends ESTestCase {
2323

2424
public void testFactory() throws Exception {
25+
String processorTag = randomAlphaOfLength(10);
26+
2527
Model mockModel = mock(Model.class);
2628
ModelLoader mockLoader = mock(ModelLoader.class);
27-
when(mockLoader.load(eq("k2"), eq("inference"), eq(false), any())).thenReturn(mockModel);
29+
when(mockLoader.load(eq("k2"), eq(processorTag), eq(false), any())).thenReturn(mockModel);
2830

2931
InferenceProcessor.Factory factory = new InferenceProcessor.Factory(Map.of("test", mockLoader));
3032

3133
Map<String, Object> config = new HashMap<>();
3234
config.put("model_id", "k2");
3335
config.put("model_type", "test");
34-
String processorTag = randomAlphaOfLength(10);
3536

3637
InferenceProcessor processor = factory.create(Collections.emptyMap(), processorTag, config);
3738
assertThat(processor.getTag(), equalTo(processorTag));

0 commit comments

Comments
 (0)