Skip to content

Commit 69450f5

Browse files
Better tests
1 parent 16dde0e commit 69450f5

File tree

1 file changed

+7
-3
lines changed
  • x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/aggregation/blockhash

1 file changed

+7
-3
lines changed

x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/aggregation/blockhash/BlockHashTests.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,10 +1235,14 @@ public void testLongNull() {
12351235
}, blockFactory.newLongArrayVector(values, values.length).asBlock(), blockFactory.newConstantNullBlock(values.length));
12361236
}
12371237

1238-
public void test2BytesRefsKeys() {
1238+
public void test2BytesRefsHighCardinalityKey() {
12391239
final Page page;
1240-
final int positions1 = 100_000;
1241-
final int positions2 = 10;
1240+
int positions1 = 10;
1241+
int positions2 = 100_000;
1242+
if (randomBoolean()) {
1243+
positions1 = 100_000;
1244+
positions2 = 10;
1245+
}
12421246
final int totalPositions = positions1 * positions2;
12431247
try (
12441248
BytesRefBlock.Builder builder1 = blockFactory.newBytesRefBlockBuilder(totalPositions);

0 commit comments

Comments
 (0)