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/02/08 17:42:00 UTC

[unomi] branch UNOMI-728-index-migration updated (8e791d5f0 -> ffe6ad8a0)

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

jsinovassinnaik pushed a change to branch UNOMI-728-index-migration
in repository https://gitbox.apache.org/repos/asf/unomi.git


 discard 8e791d5f0 UNOMI-728 : add integrations tests
     new ffe6ad8a0 UNOMI-728 : add integrations tests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8e791d5f0)
            \
             N -- N -- N   refs/heads/UNOMI-728-index-migration (ffe6ad8a0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[unomi] 01/01: UNOMI-728 : add integrations tests

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

jsinovassinnaik pushed a commit to branch UNOMI-728-index-migration
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit ffe6ad8a03531ef21a0fe94e49c0243d6452b659
Author: jsinovassin <js...@jahia.com>
AuthorDate: Wed Feb 8 18:27:31 2023 +0100

    UNOMI-728 : add integrations tests
---
 .../test/java/org/apache/unomi/itests/AllITs.java  |   4 ++--
 ...grate16xTo200IT.java => Migrate16xTo220IT.java} |  10 +++++++++-
 .../resources/migration/snapshots_repository.zip   | Bin 868699 -> 3901776 bytes
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/itests/src/test/java/org/apache/unomi/itests/AllITs.java b/itests/src/test/java/org/apache/unomi/itests/AllITs.java
index a968eaa57..60502de03 100644
--- a/itests/src/test/java/org/apache/unomi/itests/AllITs.java
+++ b/itests/src/test/java/org/apache/unomi/itests/AllITs.java
@@ -17,7 +17,7 @@
 
 package org.apache.unomi.itests;
 
-import org.apache.unomi.itests.migration.Migrate16xTo200IT;
+import org.apache.unomi.itests.migration.Migrate16xTo220IT;
 import org.apache.unomi.itests.graphql.*;
 import org.apache.unomi.itests.migration.MigrationIT;
 import org.junit.runner.RunWith;
@@ -31,7 +31,7 @@ import org.junit.runners.Suite.SuiteClasses;
  */
 @RunWith(Suite.class)
 @SuiteClasses({
-        Migrate16xTo200IT.class,
+        Migrate16xTo220IT.class,
         MigrationIT.class,
         BasicIT.class,
         ConditionEvaluatorIT.class,
diff --git a/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo200IT.java b/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
similarity index 96%
rename from itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo200IT.java
rename to itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
index 5bf809d11..63e84ff58 100644
--- a/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo200IT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
@@ -33,7 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
-public class Migrate16xTo200IT extends BaseIT {
+public class Migrate16xTo220IT extends BaseIT {
 
     @Override
     @Before
@@ -84,8 +84,16 @@ public class Migrate16xTo200IT extends BaseIT {
         checkViewEventRestructured();
         checkEventTypesNotPersistedAnymore();
         checkForMappingUpdates();
+        checkNewIndexesExists();
     }
 
+    /**
+     * Checks if at least the new index for events and sessions exists.
+     */
+    private void checkNewIndexesExists() throws IOException {
+        Assert.assertTrue(MigrationUtils.indexExists(httpClient, "http://localhost:9400", "context-event-000001"));
+        Assert.assertTrue(MigrationUtils.indexExists(httpClient, "http://localhost:9400", "context-session-000001"));
+    }
     /**
      * Multiple index mappings have been update, check a simple check that after migration those mappings contains the latest modifications.
      */
diff --git a/itests/src/test/resources/migration/snapshots_repository.zip b/itests/src/test/resources/migration/snapshots_repository.zip
index 1252d50a1..699e5c61f 100644
Binary files a/itests/src/test/resources/migration/snapshots_repository.zip and b/itests/src/test/resources/migration/snapshots_repository.zip differ