Skip to content

Commit

Permalink
feat: fixed page size when loading mfe and ms for products (#39)
Browse files Browse the repository at this point in the history
* feat: fixed page size when loading mfe and ms for products

* fix: fixed mock
  • Loading branch information
JordenReuter authored May 22, 2024
1 parent 86a6b88 commit e468457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public Response getDetailsByWorkspaceName(String workspaceName) {
if (workspaceResponse.getProducts() != null) {
//get mfe and ms for each product by name from product-store
ProductItemLoadSearchCriteria mfeAndMsCriteria = new ProductItemLoadSearchCriteria();
mfeAndMsCriteria.setPageSize(workspaceResponse.getProducts().size());
mfeAndMsCriteria.setProductNames(new ArrayList<>(workspaceResponse.getProducts()));

try (Response productStoreResponse = productStoreClient.loadProductsByCriteria(mfeAndMsCriteria)) {
productsLoadResult = productStoreResponse.readEntity(ProductsLoadResult.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ void getDetailsByWorkspaceNameTest() {
List<String> productNames = List.of("product1", "product2");
ProductItemLoadSearchCriteria criteria = new ProductItemLoadSearchCriteria();
criteria.setProductNames(productNames);
criteria.setPageSize(productNames.size());

ProductsLoadResult result = new ProductsLoadResult();

Expand Down

0 comments on commit e468457

Please sign in to comment.