File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
test/framework/src/main/java/org/elasticsearch/test
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public abstract class AbstractWireTestCase<T> extends ESTestCase {
5454 * Tests that the equals and hashcode methods are consistent and copied
5555 * versions of the instance are equal.
5656 */
57- public final void testEqualsAndHashcode () {
57+ public void testEqualsAndHashcode () {
5858 for (int runs = 0 ; runs < NUMBER_OF_TEST_RUNS ; runs ++) {
5959 T testInstance = createTestInstance ();
6060 try {
Original file line number Diff line number Diff line change 2727import static org .hamcrest .Matchers .equalTo ;
2828import static org .hamcrest .Matchers .notNullValue ;
2929
30+
31+
3032public class HealthApiFeatureSetUsageTests extends AbstractWireSerializingTestCase <HealthApiFeatureSetUsage > {
3133
3234 @ Override
@@ -37,9 +39,9 @@ protected HealthApiFeatureSetUsage createTestInstance() {
3739 @ Override
3840 protected HealthApiFeatureSetUsage mutateInstance (HealthApiFeatureSetUsage instance ) {
3941 Map <String , Object > originalStats = instance .stats ();
40- Counters newStats = randomCounters ();
42+ Counters newStats = randomCounters (false );
4143 while (originalStats .equals (newStats .toMutableNestedMap ())) {
42- newStats = randomCounters ();
44+ newStats = randomCounters (false );
4345 }
4446 return new HealthApiFeatureSetUsage (true , true , newStats );
4547 }
@@ -50,7 +52,11 @@ protected Writeable.Reader<HealthApiFeatureSetUsage> instanceReader() {
5052 }
5153
5254 private Counters randomCounters () {
53- if (rarely ()) {
55+ return randomCounters (true );
56+ }
57+
58+ private Counters randomCounters (boolean allowNull ) {
59+ if (allowNull && rarely ()) {
5460 return null ;
5561 }
5662 Counters counters = new Counters ();
You can’t perform that action at this time.
0 commit comments