Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
enricocolasante committed Oct 13, 2023
1 parent 840c7ac commit c688103
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ public void validateSearchScope(TrackedEntityQueryParams params, boolean isGridS
}

private void checkIfMaxTeiLimitIsReached(TrackedEntityQueryParams params, int maxTeiLimit) {
if (maxTeiLimit > 0 && (!params.isPaging() || params.getPageSize().intValue() > maxTeiLimit )) {
if (maxTeiLimit > 0 && (!params.isPaging() || params.getPageSize().intValue() > maxTeiLimit)) {
int teCount = trackedEntityStore.getTrackedEntityCountForGridWithMaxTeiLimit(params);

if (teCount > maxTeiLimit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void setup() {
params.setProgram(new Program("Test program"));
params.getProgram().setMaxTeiCountToReturn(10);
params.setTrackedEntityUids(Set.of("1"));
params.setSkipPaging(true);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ private boolean isProgramMinAttributesViolated(TrackedEntityQueryParams params)
}

private void checkIfMaxTeiLimitIsReached(TrackedEntityQueryParams params, int maxTeiLimit) {
if (maxTeiLimit > 0 && (!params.isPaging() || params.getPageSize().intValue() > maxTeiLimit )) {
if (maxTeiLimit > 0 && (!params.isPaging() || params.getPageSize().intValue() > maxTeiLimit)) {
int teCount = trackedEntityStore.getTrackedEntityCountWithMaxTrackedEntityLimit(params);

if (teCount > maxTeiLimit) {
Expand Down

0 comments on commit c688103

Please sign in to comment.