xtern commented on code in PR #5113:
URL: https://github.com/apache/ignite-3/pull/5113#discussion_r1930035701


##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/commands/AbstractCommandValidationTest.java:
##########
@@ -193,13 +194,14 @@ static CatalogCommand createZoneCommand(String zoneName, 
List<String> storagePro
     }
 
     static Catalog applyCommandsToCatalog(Catalog catalog, CatalogCommand... 
commandsToApply) {
+        UpdateContext updateContext = new UpdateContext(catalog);
         for (CatalogCommand command : commandsToApply) {
-            for (UpdateEntry updates : command.get(catalog)) {
-                catalog = updates.applyUpdate(catalog, 
INITIAL_CAUSALITY_TOKEN);
+            for (UpdateEntry updates : command.get(updateContext)) {
+                updateContext = new 
UpdateContext(updates.applyUpdate(updateContext.catalog(), 
INITIAL_CAUSALITY_TOKEN));

Review Comment:
   Done, thanks



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImplTest.java:
##########
@@ -489,48 +485,27 @@ public void testHashIndex() {
                 createHashIndex("T1", "VAL1_IDX", "VAL1")
         )));
 
-        {
-            int versionAfter = catalogManager.latestCatalogVersion();
-            assertThat(versionAfter, equalTo(versionBefore + 1));
-
-            SchemaPlus rootSchema = sqlSchemaManager.schema(versionAfter);
-            assertNotNull(rootSchema);
-
-            SchemaPlus schemaPlus = 
rootSchema.getSubSchema(PUBLIC_SCHEMA_NAME);
-            assertNotNull(schemaPlus);
-
-            IgniteIndex index = findIndex(unwrapSchema(schemaPlus), "T1", 
"VAL1_IDX");
-            assertNull(index, "Index should not be available");
-
-            Map<String, ?> indexes = findTableIndexes(versionAfter, 
PUBLIC_SCHEMA_NAME, "T1");
-            assertEquals(Set.of("T1_PK"), indexes.keySet());
-        }
-
-        makeIndexAvailable("VAL1_IDX");
-
-        {
-            int versionAfter = catalogManager.latestCatalogVersion();
-            assertThat(versionAfter, equalTo(versionBefore + 2));
+        int versionAfter = catalogManager.latestCatalogVersion();
+        assertThat(versionAfter, equalTo(versionBefore + 1));

Review Comment:
   Done, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to