Skip to content

Commit 45c12e9

Browse files
committed
Fix invalid setting value in tests
1 parent 51877bb commit 45c12e9

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
@@ -567,7 +567,7 @@ private static ClusterService createClusterService(boolean useLegacyFormat) {
567567
ClusterState clusterState = ClusterState.builder(new ClusterName("test")).metadata(metadata).build();
568568
ClusterService clusterService = mock(ClusterService.class);
569569
when(clusterService.state()).thenReturn(clusterState);
570-
long batchSizeInBytes = randomLongBetween(0, ByteSizeValue.ofKb(1).getBytes());
570+
long batchSizeInBytes = randomLongBetween(1, ByteSizeValue.ofKb(1).getBytes());
571571
Settings settings = Settings.builder().put(INDICES_INFERENCE_BATCH_SIZE.getKey(), ByteSizeValue.ofBytes(batchSizeInBytes)).build();
572572
when(clusterService.getSettings()).thenReturn(settings);
573573
when(clusterService.getClusterSettings()).thenReturn(new ClusterSettings(settings, Set.of(INDICES_INFERENCE_BATCH_SIZE)));

0 commit comments

Comments
 (0)