Skip to content

Commit c510766

Browse files
author
afoucret
committed
Fix test regressions.
1 parent 2def324 commit c510766

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/inference/InferenceOperatorTestCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.junit.After;
4141
import org.junit.Before;
4242

43+
import java.util.HashSet;
4344
import java.util.function.BiFunction;
4445
import java.util.function.Consumer;
4546

@@ -146,7 +147,8 @@ private void runWithRandomDelay(Runnable runnable) {
146147
};
147148

148149
ClusterService clusterService = mock(ClusterService.class);
149-
when(clusterService.getClusterSettings()).thenReturn(mock(ClusterSettings.class));
150+
ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, new HashSet<>(InferenceSettings.getSettings()));
151+
when(clusterService.getClusterSettings()).thenReturn(clusterSettings);
150152
when(clusterService.getSettings()).thenReturn(Settings.EMPTY);
151153

152154
return new InferenceService(mockClient, clusterService);

0 commit comments

Comments
 (0)