ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [04/10] incubator-ignite git commit: sp-1 fixed test
Date Fri, 13 Feb 2015 04:04:46 GMT
sp-1 fixed test


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

Branch: refs/heads/ignite-143
Commit: 36ecaff7464091fa15916801f2c442518371b1bb
Parents: daed848
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Feb 13 00:40:26 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Feb 13 00:40:26 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/GridH2IndexRebuildTest.java       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36ecaff7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index 232ae2b..baf7ae7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -49,7 +49,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
         private volatile boolean sleepInRebuild;
 
         /** */
-        private volatile boolean interrupted;
+        private volatile CountDownLatch interrupted;
 
         /**
          * Constructor.
@@ -65,7 +65,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
                     U.sleep(Long.MAX_VALUE);
                 }
                 catch (IgniteInterruptedCheckedException ignored) {
-                    interrupted = true;
+                    interrupted.countDown();
                 }
             }
 
@@ -223,6 +223,8 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
      * @throws Exception if failed.
      */
     private void checkCancel(final IgniteInternalFuture<?> fut) throws Exception {
+        spi.interrupted = new CountDownLatch(1);
+
         assertTrue(fut.cancel());
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
@@ -233,9 +235,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
             }
         }, IgniteFutureCancelledCheckedException.class, null);
 
-        assertTrue(spi.interrupted);
-
-        spi.interrupted = false;
+        assertTrue(spi.interrupted.await(5, TimeUnit.SECONDS));
     }
 
     /**


Mime
View raw message