Skip to content

Commit

Permalink
Fix bug with multiple transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanvanhuuksloot committed Jul 4, 2024
1 parent 93a8134 commit 60dee30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ record NamedItem(String name, ConfigMappable item) {

named.stream()
.map(NamedItem::name)
.reduce((x, y) -> String.join(","))
.reduce((x, y) -> x + "," + y)
.ifPresent(names -> put(key, names));


named.forEach(item -> putAll(key + "." + item.name, item.item));
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void shouldAddList() {

config.putList("transforms", transformations, "Reroute");

assertThat(config.getAsMap()).containsEntry("transforms", "");
assertThat(config.getAsMap()).containsEntry("transforms", "Reroute0,Reroute1");
assertThat(config.getAsMap()).containsEntry("transforms.Reroute0.type", "io.debezium.transforms.ByLogicalTableRouter");
assertThat(config.getAsMap()).containsEntry("transforms.Reroute0.negate", "false");
assertThat(config.getAsMap()).containsEntry("transforms.Reroute1.type", "io.debezium.transforms.ByLogicalTableRouter");
Expand All @@ -93,7 +93,7 @@ void shouldAddList() {
"transforms.Reroute0.type=io.debezium.transforms.ByLogicalTableRouter\n" +
"transforms.Reroute1.negate=true\n" +
"transforms.Reroute1.type=io.debezium.transforms.ByLogicalTableRouter\n" +
"transforms=");
"transforms=Reroute0,Reroute1");
}

@Test
Expand Down

0 comments on commit 60dee30

Please sign in to comment.