You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by jk...@apache.org on 2023/02/28 10:43:23 UTC
[unomi] branch reduceIndicesItems3 updated: UNOMI-736: Fix IT
This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch reduceIndicesItems3
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/reduceIndicesItems3 by this push:
new 90b4c7139 UNOMI-736: Fix IT
90b4c7139 is described below
commit 90b4c71399f2d3f40c5ee26d8d0954f849dc0a52
Author: Kevan <ke...@jahia.com>
AuthorDate: Tue Feb 28 11:43:06 2023 +0100
UNOMI-736: Fix IT
---
.../java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java b/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
index 942ba4445..d6fd985ec 100644
--- a/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
@@ -40,6 +40,7 @@ public class Migrate16xTo220IT extends BaseIT {
private int sessionCount = 0;
private static final int NUMBER_DUPLICATE_SESSIONS = 3;
+ private static final int NUMBER_PERSONASESSIONS = 2;
@Override
@Before
public void waitForStartup() throws InterruptedException {
@@ -96,6 +97,9 @@ public class Migrate16xTo220IT extends BaseIT {
/**
* Checks if at least the new index for events and sessions exists.
+ * Also checks:
+ * - duplicated sessions are correctly removed
+ * - persona sessions are now merged in session index due to index reduction in 2_2_0
*/
private void checkEventSessionRollover2_2_0() throws IOException {
Assert.assertTrue(MigrationUtils.indexExists(httpClient, "http://localhost:9400", "context-event-000001"));
@@ -113,7 +117,7 @@ public class Migrate16xTo220IT extends BaseIT {
newSessioncount += jsonNode.get("count").asInt();
}
Assert.assertEquals(eventCount, newEventcount);
- Assert.assertEquals(sessionCount - NUMBER_DUPLICATE_SESSIONS, newSessioncount);
+ Assert.assertEquals(sessionCount - NUMBER_DUPLICATE_SESSIONS - NUMBER_PERSONASESSIONS, newSessioncount);
}
/**