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

wernerdv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a0aaf65f90 IGNITE-29136 Fix flaky 
ViewsIntegrationTest.testSchemaCleaning (#13684)
5a0aaf65f90 is described below

commit 5a0aaf65f9015a2c704428de6840586243c51cec
Author: Dmitry Werner <[email protected]>
AuthorDate: Tue Oct 13 19:37:13 2026 +0800

    IGNITE-29136 Fix flaky ViewsIntegrationTest.testSchemaCleaning (#13684)
---
 .../calcite/integration/ViewsIntegrationTest.java  | 39 ++++++++++++++++------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ViewsIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ViewsIntegrationTest.java
index 9e26de4d6ed..215092fb5de 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ViewsIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ViewsIntegrationTest.java
@@ -25,11 +25,14 @@ import 
org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
 import org.apache.ignite.internal.util.typedef.G;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
+
 /** */
 public class ViewsIntegrationTest extends AbstractMultiEngineIntegrationTest {
     /** */
@@ -401,16 +404,32 @@ public class ViewsIntegrationTest extends 
AbstractMultiEngineIntegrationTest {
     }
 
     /** */
-    private void assertViewsCount(String schemaName, String viewName, int cnt) 
{
-        for (Ignite ignite : G.allGrids()) {
-            try {
-                assertEquals(cnt, sql((IgniteEx)ignite, "SELECT * FROM 
sys.views WHERE schema = ? AND name = ?",
-                    schemaName, viewName).size());
-            }
-            catch (Throwable e) {
-                throw new AssertionError("Unexpected views count [grid=" + 
ignite.name() + ", schemaName=" +
-                    schemaName + ", viewName=" + viewName + ']', e);
+    private void assertViewsCount(String schemaName, String viewName, int cnt) 
throws IgniteInterruptedCheckedException {
+        String[] err = {null};
+
+        boolean ok = waitForCondition(() -> {
+            for (Ignite ignite : G.allGrids()) {
+                try {
+                    if (sql((IgniteEx)ignite, "SELECT * FROM sys.views WHERE 
schema = ? AND name = ?",
+                        schemaName, viewName).size() != cnt) {
+                        err[0] = "Unexpected views count [grid=" + 
ignite.name() + ", schemaName=" + schemaName +
+                            ", viewName=" + viewName + ", cnt=" + cnt + ']';
+
+                        return false;
+                    }
+                }
+                catch (Throwable e) {
+                    err[0] = "Failed to get views count [grid=" + 
ignite.name() + ", schemaName=" + schemaName +
+                        ", viewName=" + viewName + ", cnt=" + cnt + "]: " + 
e.getMessage();
+
+                    return false;
+                }
             }
-        }
+
+            return true;
+        }, 10_000L);
+
+        if (!ok)
+            fail(err[0]);
     }
 }

Reply via email to