Repository: incubator-ignite Updated Branches: refs/heads/ignite-1026 d38ad8ce2 -> d27453fdc
IGNITE-1026 - Count down latch fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d27453fd Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d27453fd Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d27453fd Branch: refs/heads/ignite-1026 Commit: d27453fdcdea4612a7ba4d0ef6b0168eb5569ed0 Parents: d38ad8c Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Thu Jul 2 17:52:56 2015 -0700 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Thu Jul 2 17:52:56 2015 -0700 ---------------------------------------------------------------------- .../IgniteCountDownLatchAbstractSelfTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d27453fd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java index 80e6123..01ffaf4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java @@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache.datastructures; import org.apache.ignite.*; import org.apache.ignite.internal.*; +import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import org.apache.ignite.resources.*; -import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.testframework.*; import org.jetbrains.annotations.*; @@ -133,7 +133,13 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics * * @throws Exception If failed. */ - protected void checkRemovedLatch(IgniteCountDownLatch latch) throws Exception { + protected void checkRemovedLatch(final IgniteCountDownLatch latch) throws Exception { + assert GridTestUtils.waitForCondition(new PA() { + @Override public boolean apply() { + return latch.removed(); + } + }, 5000); + assert latch.removed(); assert latch.count() == 0; @@ -177,7 +183,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics */ private void checkAwait() throws Exception { // Check only 'false' cases here. Successful await is tested over the grid. - IgniteCountDownLatch latch = createLatch("await", 5, true); + IgniteCountDownLatch latch = createLatch("await", 5, false); assert !latch.await(10); assert !latch.await(10, MILLISECONDS);