Signed-off-by: wind57 <eugen.rabii@gmail.com>
This commit is contained in:
wind57
2025-04-08 23:42:50 +03:00
parent c2647ca6dc
commit 8a43f03a16
2 changed files with 4 additions and 1 deletions

View File

@@ -24,6 +24,8 @@ import java.util.Map;
*
* Container that stores multiple sources, to be exact their names and their flattenned
* data. We force a LinkedHashSet on purpose, to preserve the order of sources.
* @apiNote in a future major release, instead of taking two arguments as input, we will
* take only one: {@code LinkedHashMap<String, Map<String, Object>> }
*/
public record MultipleSourcesContainer(LinkedHashSet<String> names, Map<String, Object> data) {

View File

@@ -226,6 +226,7 @@ class ConfigUtilsTests {
}
@Test
@SuppressWarnings("unchecked")
void testIssue1757() {
StrippedSourceContainer containerA = new StrippedSourceContainer(Map.of("load", "true"), "client-1",
@@ -238,7 +239,7 @@ class ConfigUtilsTests {
new MockEnvironment(), Map.of("load", "true"), "default", Set.of(), false);
System.out.println(container);
assertThat(container.names()).containsExactly("client-1", "client-2");
assertThat(container.names()).containsExactlyInAnyOrder("client-1", "client-2");
Map<String, Object> client1Data = (Map<String, Object>) container.data().get("client-1");
assertThat(client1Data)