Skip to content

Commit 90c98e1

Browse files
authored
Fix ActionConfigStatsTests.testEqualsAndHashcode (#74849)
This change fixes failing ActionConfigStatsTests.testEqualsAndHashcode by making sure we use different shrink number of shards after mutation. Closes #74817
1 parent 577e9e4 commit 90c98e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/ActionConfigStatsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected ActionConfigStats mutateInstance(ActionConfigStats instance) throws IO
9696
builder.setShrinkMaxPrimaryShardSize(randomPrimaryByteSize);
9797
break;
9898
case 8:
99-
builder.setShrinkNumberOfShards(randomIntBetween(0, 50));
99+
builder.setShrinkNumberOfShards(randomValueOtherThan(instance.getShrinkNumberOfShards(), () -> randomIntBetween(0, 50)));
100100
break;
101101
default:
102102
throw new IllegalStateException("Illegal randomization branch");

0 commit comments

Comments
 (0)