This is an automated email from the ASF dual-hosted git repository. jsinovassinnaik pushed a commit to branch UNOMI-780-backport-use-scroll-queries in repository https://gitbox.apache.org/repos/asf/unomi.git
commit 2e33904079716ac1268087bbb2705828fdffad55 Author: jsinovassin <[email protected]> AuthorDate: Fri May 12 14:46:51 2023 +0200 fix IT test --- itests/src/test/java/org/apache/unomi/itests/SegmentIT.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java index d230a07c3..3103f956d 100644 --- a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java @@ -265,6 +265,7 @@ public class SegmentIT extends BaseIT { Event testEvent = new Event("negative-test-event-type", null, profile, null, null, profile, Date.from(localDate.atStartOfDay(defaultZoneId).toInstant())); testEvent.setPersistent(true); int changes = eventService.send(testEvent); + Assert.assertTrue("Profile should have been updated", (changes & EventService.PROFILE_UPDATED) == EventService.PROFILE_UPDATED); if ((changes & EventService.PROFILE_UPDATED) == EventService.PROFILE_UPDATED) { profileService.save(profile); persistenceService.refreshIndex(Profile.class, null); @@ -556,7 +557,7 @@ public class SegmentIT extends BaseIT { testEvent = new Event("test-event-type", null, testEvent.getProfile(), null, null, testEvent.getProfile(), timestampEventInRange); eventService.send(testEvent); persistenceService.refreshIndex(Event.class, timestampEventInRange); - + refreshPersistence(Profile.class); // insure the profile is engaged; Assert.assertTrue("Profile should have 2 events in the scoring", (Long) ((Map) testEvent.getProfile().getSystemProperties().get("pastEvents")).get(pastEventCondition.getParameterValues().get("generatedPropertyKey")) == 2); Assert.assertTrue("Profile is engaged", testEvent.getProfile().getScores().containsKey("past-event-scoring-test") && testEvent.getProfile().getScores().get("past-event-scoring-test") == 50); @@ -734,4 +735,4 @@ public class SegmentIT extends BaseIT { updatedProfile -> !updatedProfile.getSegments().contains("relative-date-segment-test") && (updatedProfile.getScores() == null || !updatedProfile.getScores().containsKey("relative-date-scoring-test")), 1000, 20); } -} \ No newline at end of file +}
