Skip to content

Commit

Permalink
EPMRPP-87044 exclude empty statistics records from processing
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Oct 30, 2023
1 parent f042158 commit 884ef9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ private List<HealthCheckTableContent> concat(boolean contentFirst,
result.add(resultEntry);
});
} else {
columnMapping.forEach((key, attributes) -> {
HealthCheckTableContent resultEntry = ofNullable(content.remove(key)).map(
statisticsContent -> entryFromStatistics(key,
statisticsContent
)).orElseGet(HealthCheckTableContent::new);
resultEntry.setCustomValues(attributes);
result.add(resultEntry);
});
columnMapping.forEach((key, attributes) ->
ofNullable(content.remove(key))
.map(statisticsContent -> entryFromStatistics(key, statisticsContent))
.ifPresent(resultEntry -> {
resultEntry.setCustomValues(attributes);
result.add(resultEntry);
}));

content.forEach((key, statistics) -> result.add(entryFromStatistics(key, statistics)));
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ void componentHealthCheckTable() {
.of("first", "build", Sort.by(Sort.Direction.DESC, "customColumn"), true,
new ArrayList<>()));

assertFalse(healthCheckTableContents.isEmpty());
assertTrue(healthCheckTableContents.isEmpty());

initParams = HealthCheckTableInitParams.of("hello",
com.google.common.collect.Lists.newArrayList("build"));
Expand Down Expand Up @@ -1440,9 +1440,9 @@ void componentHealthCheckTableCompositeAttributeWithoutAny() {
new ArrayList<>()
));

assertFalse(healthCheckTableContents.isEmpty());
assertTrue(healthCheckTableContents.isEmpty());

widgetContentRepository.removeWidgetView(initParams.getViewName());

}
}
}

0 comments on commit 884ef9c

Please sign in to comment.