This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch UNOMI-676-fix-rule-50-limit
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/UNOMI-676-fix-rule-50-limit by
this push:
new 89dc7b850 UNOMI-676: fix past event recalculation limited to 50 rules
89dc7b850 is described below
commit 89dc7b850cf64ab6c8f4640dc0c48c11d6513d33
Author: Kevan <[email protected]>
AuthorDate: Fri Sep 23 14:29:07 2022 +0200
UNOMI-676: fix past event recalculation limited to 50 rules
---
itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
b/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
index c39be078f..173fbb6a6 100644
--- a/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
@@ -79,8 +79,9 @@ public class RuleServiceIT extends BaseIT {
}
@Test
- public void testMoreThan50Rules() throws InterruptedException {
+ public void getAllRulesShouldReturnAllRulesAvailable() throws
InterruptedException {
String ruleIDBase = "moreThan50RuleTest";
+ int originalRulesNumber = rulesService.getAllRules().size();
for (int i = 0; i < 60; i++) {
String ruleID = ruleIDBase + "_" + i;
Metadata metadata = new Metadata(ruleID);
@@ -92,7 +93,8 @@ public class RuleServiceIT extends BaseIT {
nullRule.setActions(null);
createAndWaitForRule(nullRule);
}
- assertTrue("Expected rule actions to be null",
rulesService.getAllRules().size() >= 60);
+ assertEquals("Expected getAllRules to be able to retrieve all the
rules available in the system", originalRulesNumber + 60,
rulesService.getAllRules().size());
+ // cleanup
for (int i = 0; i < 60; i++) {
String ruleID = ruleIDBase + "_" + i;
rulesService.removeRule(ruleID);