This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/master by this push:
new aec6a7aeb fix flakiness in tests (#596)
aec6a7aeb is described below
commit aec6a7aeb4d688d4d307c5cd74716672451f138d
Author: jsinovassin <[email protected]>
AuthorDate: Wed Mar 22 20:37:26 2023 +0000
fix flakiness in tests (#596)
---
.../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));
}
}