Skip to content

Commit f0cf530

Browse files
Merge branch 'main' into update_snippet_comments
2 parents d7da5dd + 0dcf3ed commit f0cf530

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,6 @@ tests:
579579
- class: org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS2UnavailableRemotesIT
580580
method: testEsqlRcs2UnavailableRemoteScenarios
581581
issue: https://github.com/elastic/elasticsearch/issues/136493
582-
- class: org.elasticsearch.xpack.core.HealthApiFeatureSetUsageTests
583-
method: testEqualsAndHashcode
584-
issue: https://github.com/elastic/elasticsearch/issues/136648
585582
- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT
586583
method: testILMDownsampleRollingRestart
587584
issue: https://github.com/elastic/elasticsearch/issues/136585

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ protected HealthApiFeatureSetUsage createTestInstance() {
3737
@Override
3838
protected HealthApiFeatureSetUsage mutateInstance(HealthApiFeatureSetUsage instance) {
3939
Map<String, Object> originalStats = instance.stats();
40-
Counters newStats = randomCounters();
40+
Counters newStats = randomCounters(false);
4141
while (originalStats.equals(newStats.toMutableNestedMap())) {
42-
newStats = randomCounters();
42+
newStats = randomCounters(false);
4343
}
4444
return new HealthApiFeatureSetUsage(true, true, newStats);
4545
}
@@ -50,7 +50,11 @@ protected Writeable.Reader<HealthApiFeatureSetUsage> instanceReader() {
5050
}
5151

5252
private Counters randomCounters() {
53-
if (rarely()) {
53+
return randomCounters(true);
54+
}
55+
56+
private Counters randomCounters(boolean allowNull) {
57+
if (allowNull && rarely()) {
5458
return null;
5559
}
5660
Counters counters = new Counters();

0 commit comments

Comments
 (0)