Skip to content

Commit

Permalink
Merge branch 'main' into mcs-tabular-modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ne0ds authored Jan 5, 2024
2 parents d295649 + 0c2950a commit 4ccf65a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ public List<ModificationInfos> getModificationsInfos(List<UUID> groupUuids, bool
Stream<ModificationEntity> modificationEntity = groupUuids.stream().flatMap(this::getModificationEntityStream);
if (onlyStashed) {
return modificationEntity.filter(m -> m.getStashed() == onlyStashed)
.map(ModificationEntity::toModificationInfos)
.map(this::getModificationInfos)
.collect(Collectors.toList());
} else {
return modificationEntity.map(ModificationEntity::toModificationInfos)
return modificationEntity.map(this::getModificationInfos)
.collect(Collectors.toList());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ public void testCheckSqlRequestsCount() throws Exception {
.andReturn();
// We check that the request count is not dependent on the number of sub modifications of the tabular modification (the JPA N+1 problem is correctly solved)
assertSelectCount(3);
reset();

// We get the modifications of the group (so the 2 tabular modifications)
mockMvc.perform(get("/v1/groups/{groupUuid}/network-modifications", getGroupId()))
.andExpect(status().isOk());
// We check that the request count is not dependent on the number of sub modifications of the tabular modification (the JPA N+1 problem is correctly solved)
assertSelectCount(6);
}

@Test
Expand Down

0 comments on commit 4ccf65a

Please sign in to comment.