You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/12/06 13:18:29 UTC

ignite git commit: IGNITE-7120: SQL: fixed falky failures in AbstractSchemaSelfTest. This closes #3156.

Repository: ignite
Updated Branches:
  refs/heads/master 1367bc98e -> f905442e7


IGNITE-7120: SQL: fixed falky failures in AbstractSchemaSelfTest. This closes #3156.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f905442e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f905442e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f905442e

Branch: refs/heads/master
Commit: f905442e72ef4ad202410b5492caba23874d9804
Parents: 1367bc9
Author: Alexander Paschenko <al...@gmail.com>
Authored: Wed Dec 6 16:18:17 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Dec 6 16:18:17 2017 +0300

----------------------------------------------------------------------
 .../cache/index/AbstractSchemaSelfTest.java       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f905442e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java
index 5310f46..dbc6290 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor;
 import org.apache.ignite.internal.processors.port.GridPortRecord;
 import org.apache.ignite.internal.processors.query.GridQueryProcessor;
@@ -48,6 +49,7 @@ import org.apache.ignite.internal.util.GridStringBuilder;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.SB;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
@@ -172,6 +174,8 @@ public abstract class AbstractSchemaSelfTest extends GridCommonAbstractTest {
      */
     static void assertIndex(Ignite node, String cacheName, String tblName,
         String idxName, int inlineSize, IgniteBiTuple<String, Boolean>... fields) {
+        awaitCompletion();
+
         node.cache(cacheName);
 
         IgniteEx node0 = (IgniteEx)node;
@@ -267,6 +271,8 @@ public abstract class AbstractSchemaSelfTest extends GridCommonAbstractTest {
      * @param idxName Index name.
      */
     static void assertNoIndex(Ignite node, String cacheName, String tblName, String idxName) {
+        awaitCompletion();
+
         node.cache(cacheName);
 
         try {
@@ -285,6 +291,18 @@ public abstract class AbstractSchemaSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * Await completion (hopefully) of pending operations.
+     */
+    private static void awaitCompletion() {
+        try {
+            U.sleep(100);
+        }
+        catch (IgniteInterruptedCheckedException e) {
+            fail();
+        }
+    }
+
+    /**
      * Get table name for class.
      *
      * @param cls Class.