From b5ef7aeadf7ef5b46440d1370d1d9d266a273086 Mon Sep 17 00:00:00 2001 From: Dmitrii Shmatko Date: Fri, 17 Jan 2025 14:54:36 +0400 Subject: [PATCH] Fix test for Apple M4 --- .../teku/validator/client/ValidatorIndexProviderTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorIndexProviderTest.java b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorIndexProviderTest.java index 6730447fd6f..710126564cf 100644 --- a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorIndexProviderTest.java +++ b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorIndexProviderTest.java @@ -61,7 +61,8 @@ void shouldLoadValidatorKeys() { when(validatorApiChannel.getValidatorIndices(validators.getPublicKeys())) .thenReturn(SafeFuture.completedFuture(Map.of(key1, 1, key2, 20, key3, 300))); provider.lookupValidators(); - assertThat(provider.getValidatorIndices()).isCompletedWithValue(IntArrayList.of(1, 20, 300)); + final IntCollection actual = provider.getValidatorIndices().getImmediately(); + assertThat(actual).containsExactlyInAnyOrderElementsOf(IntArrayList.of(1, 20, 300)); } @Test @@ -99,7 +100,8 @@ void shouldLookupValidatorKeysThatWerePreviouslyUnknown() { when(validatorApiChannel.getValidatorIndices(Set.of(key1, key3))) .thenReturn(SafeFuture.completedFuture(Map.of(key1, 1, key3, 300))); provider.lookupValidators(); - assertThat(provider.getValidatorIndices()).isCompletedWithValue(IntArrayList.of(1, 20, 300)); + final IntCollection actual = provider.getValidatorIndices().getImmediately(); + assertThat(actual).containsExactlyInAnyOrderElementsOf(IntArrayList.of(1, 20, 300)); } @Test