Skip to content

Commit

Permalink
ProviderTest failing with latest nightly build
Browse files Browse the repository at this point in the history
closes #115

Signed-off-by: mposolda <[email protected]>
  • Loading branch information
mposolda committed Dec 17, 2024
1 parent bc414c5 commit c83a434
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,13 @@ private List<Map<String, Object>> sortProviders(List<Map<String, Object>> provid
}

private void compareProviders(List<Map<String, Object>> expected, List<Map<String, Object>> actual) {
assertEquals(expected.size(), actual.size(), "Providers count");
// compare ignoring list and map impl types
assertEquals(normalizeResults(actual), normalizeResults(expected));
List<Map<String, Object>> actualNormalizedList = normalizeResults(actual);
List<Map<String, Object>> expectedNormalizedList = normalizeResults(expected);

// compare that returned actual results contains all expected providers (Actual might include some more)
for (Map<String, Object> expectedItem : expectedNormalizedList) {
Assert.assertTrue(actualNormalizedList.contains(expectedItem), () -> "Item " + expectedItem + " not present in the actual list");
}
}

private List<Map<String, Object>> normalizeResults(List<Map<String, Object>> list) {
Expand Down

0 comments on commit c83a434

Please sign in to comment.