From c83a4345ff67e9f2e2ee0f0f07d54b3be67eb901 Mon Sep 17 00:00:00 2001 From: mposolda Date: Tue, 17 Dec 2024 17:52:21 +0100 Subject: [PATCH] ProviderTest failing with latest nightly build closes #115 Signed-off-by: mposolda --- .../client/testsuite/authentication/ProvidersTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/testsuite/admin-client-tests/src/test/java/org/keycloak/client/testsuite/authentication/ProvidersTest.java b/testsuite/admin-client-tests/src/test/java/org/keycloak/client/testsuite/authentication/ProvidersTest.java index 9cbcec0..1fd8961 100644 --- a/testsuite/admin-client-tests/src/test/java/org/keycloak/client/testsuite/authentication/ProvidersTest.java +++ b/testsuite/admin-client-tests/src/test/java/org/keycloak/client/testsuite/authentication/ProvidersTest.java @@ -232,9 +232,13 @@ private List> sortProviders(List> provid } private void compareProviders(List> expected, List> actual) { - assertEquals(expected.size(), actual.size(), "Providers count"); - // compare ignoring list and map impl types - assertEquals(normalizeResults(actual), normalizeResults(expected)); + List> actualNormalizedList = normalizeResults(actual); + List> expectedNormalizedList = normalizeResults(expected); + + // compare that returned actual results contains all expected providers (Actual might include some more) + for (Map expectedItem : expectedNormalizedList) { + Assert.assertTrue(actualNormalizedList.contains(expectedItem), () -> "Item " + expectedItem + " not present in the actual list"); + } } private List> normalizeResults(List> list) {