Skip to content

Commit

Permalink
PI-2391: Fixed issues with missing test data
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcphee77 committed Jul 29, 2024
1 parent cea0e95 commit 8880c4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,9 @@ internal class ProxyIntegrationTest {
.withToken()
).andExpect(status().is2xxSuccessful).andReturn().response.contentAsJson<CompareAllReport>()

assertThat(res.totalNumberOfRequests, equalTo(4))
assertThat(res.totalNumberOfRequests, equalTo(0))
assertThat(res.totalNumberOfCrns, equalTo(2))
assertThat(res.currentPageNumber, equalTo(2))
assertThat(res.unableToBeExecuted, equalTo(4))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ class CommunityApiController(
.map(CompletableFuture<CompareReport>::join)
.collect(Collectors.toList())
}
val unsuccessful = reports.filter { !it.success }
val executionFailures = reports.filter { it.testExecuted == false }
val unsuccessful = reports.filter { !it.success && it.testExecuted == true }
val executionFailures = reports.filter { it.testExecuted == false }.size

return CompareAllReport(
totalNumberOfCrns = personList.totalElements.toInt(),
totalPages = pageable.pageSize,
currentPageNumber = compare.pageNumber,
totalNumberOfRequests = reports.size,
totalNumberOfRequests = reports.size - executionFailures,
numberOfSuccessfulRequests = reports.size - unsuccessful.size,
numberOfUnsuccessfulRequests = unsuccessful.size,
executionFailures = executionFailures,
unableToBeExecuted = executionFailures,
failureReports = reports.filter { !it.success && it.testExecuted == true }
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ data class CompareAllReport(
val totalNumberOfRequests: Int,
val numberOfSuccessfulRequests: Int,
val numberOfUnsuccessfulRequests: Int,
val executionFailures: List<CompareReport>,
val unableToBeExecuted: Int,
val failureReports: List<CompareReport>,
)

0 comments on commit 8880c4e

Please sign in to comment.