Skip to content

Commit a95c3ea

Browse files
Fix invalid setting value in ShardBulkInferenceActionFilter tests (elastic#125006) (elastic#125022)
0 is not a valid value. Closes elastic#124985 Closes elastic#124986 Closes elastic#124955 Closes elastic#124954 Co-authored-by: Elastic Machine <[email protected]>
1 parent 7da26cc commit a95c3ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugin/inference/src/internalClusterTest/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void setup() throws Exception {
8787

8888
@Override
8989
protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) {
90-
long batchSizeInBytes = randomLongBetween(0, ByteSizeValue.ofKb(1).getBytes());
90+
long batchSizeInBytes = randomLongBetween(1, ByteSizeValue.ofKb(1).getBytes());
9191
return Settings.builder()
9292
.put(otherSettings)
9393
.put(LicenseSettings.SELF_GENERATED_LICENSE_TYPE.getKey(), "trial")

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ private static ClusterService createClusterService(boolean useLegacyFormat) {
561561
ClusterState clusterState = ClusterState.builder(new ClusterName("test")).metadata(metadata).build();
562562
ClusterService clusterService = mock(ClusterService.class);
563563
when(clusterService.state()).thenReturn(clusterState);
564-
long batchSizeInBytes = randomLongBetween(0, ByteSizeValue.ofKb(1).getBytes());
564+
long batchSizeInBytes = randomLongBetween(1, ByteSizeValue.ofKb(1).getBytes());
565565
Settings settings = Settings.builder().put(INDICES_INFERENCE_BATCH_SIZE.getKey(), ByteSizeValue.ofBytes(batchSizeInBytes)).build();
566566
when(clusterService.getSettings()).thenReturn(settings);
567567
when(clusterService.getClusterSettings()).thenReturn(new ClusterSettings(settings, Set.of(INDICES_INFERENCE_BATCH_SIZE)));

0 commit comments

Comments
 (0)