Skip to content

Commit

Permalink
Release 4.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
javierpoloe2y committed Jul 7, 2022
1 parent d6ef549 commit c7154ff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
springBoot = 2.6.6
dependencyManagement = 1.0.11.RELEASE
projectVersion = 4.13.0
projectVersion = 4.13.1
paypalHyperwalletDockerRepository = hyperwallet-mirakl-connector
org.gradle.jvmargs = -XX:PermSize=1024M -XX:MaxPermSize=1024M
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public interface BatchJobTrackingRepository extends JpaRepository<BatchJobTrackI
LEFT JOIN BatchJobItemTrackInfoEntity ji ON j.batchJobId = ji.batchJobId
WHERE j.batchJobType = :batchJobType
AND j.startTime >= :from
GROUP BY j.batchJobId
GROUP BY j.batchJobId, j.batchJobType, j.startTime, j.finishTime, j.status
HAVING COUNT(ji.itemId) > 0
ORDER BY j.startTime DESC
""")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ void repository_shouldFindJobsWithItems_WhenTheyAreInDateRange() {
10);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities3 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity3, 10);
BatchJobTrackInfoEntity batchJobTrackInfoEntity4 = BatchJobTrackingEntitiesMother.buildJobTrackingInfo('B', 4,
10);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities4 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity4, 10);

batchJobTrackingRepository
.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2, batchJobTrackInfoEntity3));
batchJobTrackingRepository.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2,
batchJobTrackInfoEntity3, batchJobTrackInfoEntity4));
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities1);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities3);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities4);

List<BatchJobTrackInfoEntity> jobsWithItems = batchJobTrackingRepository.findLastJobExecutionsWithItems(
batchJobTrackInfoEntity1.getBatchJobType(), TimeMachine.now().minusDays(11).minusSeconds(1),
Expand All @@ -88,10 +93,16 @@ void repository_shouldNotFindJobsWithItems_WhenTheyAreNotInDateRange() {
3);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities2 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity2, 10);
BatchJobTrackInfoEntity batchJobTrackInfoEntity4 = BatchJobTrackingEntitiesMother.buildJobTrackingInfo('B', 4,
10);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities4 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity4, 10);

batchJobTrackingRepository.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2));
batchJobTrackingRepository
.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2, batchJobTrackInfoEntity4));
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities1);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities2);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities4);

List<BatchJobTrackInfoEntity> jobsWithItems = batchJobTrackingRepository.findLastJobExecutionsWithItems(
batchJobTrackInfoEntity1.getBatchJobType(), TimeMachine.now().minusDays(2), Pageable.unpaged());
Expand All @@ -111,10 +122,16 @@ void service_shouldFindLastJobWithItems_WhenTheyAreInDateRange() {
2);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities2 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity2, 10);
BatchJobTrackInfoEntity batchJobTrackInfoEntity4 = BatchJobTrackingEntitiesMother.buildJobTrackingInfo('B', 4,
10);
List<BatchJobItemTrackInfoEntity> batchJobItemTrackInfoEntities4 = BatchJobTrackingEntitiesMother
.buildJobItemsTrackingInfo(batchJobTrackInfoEntity4, 10);

batchJobTrackingRepository.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2));
batchJobTrackingRepository
.saveAll(List.of(batchJobTrackInfoEntity1, batchJobTrackInfoEntity2, batchJobTrackInfoEntity4));
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities1);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities2);
batchJobItemTrackingRepository.saveAll(batchJobItemTrackInfoEntities4);

Optional<BatchJobTrackInfoEntity> result = batchJobTrackingService.findLastJobExecutionWithNonEmptyExtraction(
batchJobTrackInfoEntity1.getBatchJobType(), TimeMachine.now().minusDays(2).minusSeconds(1));
Expand Down

0 comments on commit c7154ff

Please sign in to comment.