You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by js...@apache.org on 2023/03/22 18:32:33 UTC

[unomi] branch fix-flakiness created (now 1e11b94f3)

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

jsinovassinnaik pushed a change to branch fix-flakiness
in repository https://gitbox.apache.org/repos/asf/unomi.git


      at 1e11b94f3 fix flakiness in tests

This branch includes the following new commits:

     new 1e11b94f3 fix flakiness in tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[unomi] 01/01: fix flakiness in tests

Posted by js...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jsinovassinnaik pushed a commit to branch fix-flakiness
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 1e11b94f32ee6840ac9ca495aa1f9515feb2befa
Author: jsinovassin <js...@jahia.com>
AuthorDate: Wed Mar 22 19:32:25 2023 +0100

    fix flakiness in tests
---
 .../test/java/org/apache/unomi/itests/CopyPropertiesActionIT.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/itests/src/test/java/org/apache/unomi/itests/CopyPropertiesActionIT.java b/itests/src/test/java/org/apache/unomi/itests/CopyPropertiesActionIT.java
index edbca99ab..a95750e9a 100644
--- a/itests/src/test/java/org/apache/unomi/itests/CopyPropertiesActionIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/CopyPropertiesActionIT.java
@@ -126,7 +126,7 @@ public class CopyPropertiesActionIT extends BaseIT {
         profileService.setPropertyType(propertyType2);
     }
 
-    private void initializePropertyTypeWithMapping() {
+    private void initializePropertyTypeWithMapping() throws InterruptedException {
         Metadata metadata = new Metadata();
         metadata.setId(MAPPED_PROPERTY);
         metadata.setName("single parameter");
@@ -140,9 +140,10 @@ public class CopyPropertiesActionIT extends BaseIT {
 
         propertyType1.setAutomaticMappingsFrom(new HashSet<>(Arrays.asList(PROPERTY_TO_MAP)));
         profileService.setPropertyType(propertyType1);
+        refreshPersistence(PropertyType.class);
     }
 
-    private void initializePropertyTypeWithDifferentSystemTag() {
+    private void initializePropertyTypeWithDifferentSystemTag() throws InterruptedException {
         Metadata metadata = new Metadata();
         metadata.setSystemTags(new HashSet<>(Arrays.asList("shouldBeAbsent")));
         metadata.setId(ARRAY_PARAM_NAME);
@@ -156,6 +157,7 @@ public class CopyPropertiesActionIT extends BaseIT {
         propertyType1.setMultivalued(true);
 
         profileService.setPropertyType(propertyType1);
+        refreshPersistence(PropertyType.class);
     }
 
     private void createRule(String filename) throws IOException, InterruptedException {
@@ -296,6 +298,6 @@ public class CopyPropertiesActionIT extends BaseIT {
 
         Event event = sendCopyPropertyEvent(properties, EMPTY_PROFILE);
 
-        Assert.assertTrue(event.getProfile().getProperty(ARRAY_PARAM_NAME) == null);
+        Assert.assertNull(event.getProfile().getProperty(ARRAY_PARAM_NAME));
     }
 }