You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/26 09:31:26 UTC
[05/29] ignite git commit:
IgniteCacheClientMultiNodeUpdateTopologyLockTest minor.
IgniteCacheClientMultiNodeUpdateTopologyLockTest minor.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/31928067
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/31928067
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/31928067
Branch: refs/heads/ignite-5024
Commit: 319280678515e4e12c10c0362883f207919e87c2
Parents: 1968e4f
Author: sboikov <sb...@gridgain.com>
Authored: Mon Apr 24 13:20:59 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Apr 24 13:20:59 2017 +0300
----------------------------------------------------------------------
...heClientMultiNodeUpdateTopologyLockTest.java | 28 +++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/31928067/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java
index 4adf5f4..7711bbb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientMultiNodeUpdateTopologyLockTest.java
@@ -100,7 +100,7 @@ public class IgniteCacheClientMultiNodeUpdateTopologyLockTest extends GridCommon
TestRecordingCommunicationSpi spi2 = TestRecordingCommunicationSpi.spi(ignite(2));
- TestRecordingCommunicationSpi clientSpi = TestRecordingCommunicationSpi.spi(clientNode);
+ final TestRecordingCommunicationSpi clientSpi = TestRecordingCommunicationSpi.spi(clientNode);
final UUID node0Id = ignite(0).cluster().localNode().id();
final UUID node2Id = ignite(2).cluster().localNode().id();
@@ -115,22 +115,30 @@ public class IgniteCacheClientMultiNodeUpdateTopologyLockTest extends GridCommon
}
});
- clientSpi.record(new IgniteBiPredicate<ClusterNode, Message>() {
- @Override public boolean apply(ClusterNode node, Message msg) {
+ clientSpi.blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
+ @Override public boolean apply(final ClusterNode node, final Message msg) {
if (!node2Id.equals(node.id()))
return false;
if (msg instanceof GridNearTxFinishRequest) {
log.info("Delay message [msg=" + msg + ']');
- try {
- Thread.sleep(5000);
- }
- catch (InterruptedException e) {
- e.printStackTrace();
- }
+ GridTestUtils.runAsync(new Runnable() {
+ @Override public void run() {
+ try {
+ Thread.sleep(5000);
+ }
+ catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ log.info("Send delayed message [msg=" + msg + ']');
+
+ clientSpi.stopBlock(true);
+ }
+ });
- log.info("Send delayed message [msg=" + msg + ']');
+ return true;
}
return false;