You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2021/01/05 13:13:16 UTC

[unomi] 01/01: Fix compilation error & other minor improvements

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch pr/223
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit f81c809c3dcc2a273b22ee987f9d9d9bdda1dd34
Author: Serge Huber <sh...@jahia.com>
AuthorDate: Tue Jan 5 14:12:57 2021 +0100

    Fix compilation error & other minor improvements
---
 .../apache/unomi/itests/ProfileServiceWithoutOverwriteIT.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/itests/src/test/java/org/apache/unomi/itests/ProfileServiceWithoutOverwriteIT.java b/itests/src/test/java/org/apache/unomi/itests/ProfileServiceWithoutOverwriteIT.java
index 5c2ed5b..bcd427e 100644
--- a/itests/src/test/java/org/apache/unomi/itests/ProfileServiceWithoutOverwriteIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/ProfileServiceWithoutOverwriteIT.java
@@ -96,16 +96,17 @@ public class ProfileServiceWithoutOverwriteIT extends BaseIT {
     public void testSaveProfileWithoutOverwriteSavesAfterReload() throws InterruptedException {
         Profile profile = setupWithoutOverwriteTests();
         String profileId = profile.getItemId();
-        Thread.sleep(4000);
+
+        profileService.refresh();
 
         Profile updatedProfile = profileService.load(profileId);
         updatedProfile.setProperty("country", "test2-country");
         profileService.save(updatedProfile);
 
-        Thread.sleep(4000);
+        profileService.refresh();
 
         Profile profileWithNewCountry = profileService.load(profileId);
-        assertEquals(profileWithNewCountry.getProperty("country"), "test2-country");
+        assertEquals("Country property doesn't have expected value", "test2-country", profileWithNewCountry.getProperty("country"));
     }
 
     @Test(expected = RuntimeException.class)
@@ -113,11 +114,11 @@ public class ProfileServiceWithoutOverwriteIT extends BaseIT {
         Profile profile = setupWithoutOverwriteTests();
         String profileId = profile.getItemId();
 
-        Thread.sleep(4000);
+        profileService.refresh();
 
         Profile updatedProfile = profileService.load(profileId);
         updatedProfile.setProperty("country", "test2-country");
-        updatedProfile.setMetadata("seq_no", 1L);
+        updatedProfile.setSystemMetadata("seq_no", 1L);
         profileService.save(updatedProfile);
     }
 }