Skip to content

Commit 9e5da6e

Browse files
authored
Fix test error in InternalCardinalityTests#testEqualsAndHashcode (#62542)
Make sure the the new HLL++ is different to the original one
1 parent 69afc6e commit 9e5da6e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalCardinalityTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ protected InternalCardinality mutateInstance(InternalCardinality instance) {
9999
case 1:
100100
HyperLogLogPlusPlus newState = new HyperLogLogPlusPlus(state.precision(),
101101
new MockBigArrays(new MockPageCacheRecycler(Settings.EMPTY), new NoneCircuitBreakerService()), 0);
102-
newState.merge(0, state, 0);
103-
int extraValues = between(10, 100);
104-
for (int i = 0; i < extraValues; i++) {
102+
for (int i = 0; i < 10; i++) {
105103
newState.collect(0, BitMixer.mix64(randomIntBetween(500, 10000)));
106104
}
107105
algos.add(newState);

0 commit comments

Comments
 (0)