ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [28/32] incubator-ignite git commit: # IGNITE-589 - Fixing tests
Date Thu, 26 Mar 2015 04:08:42 GMT
# IGNITE-589 - Fixing tests


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

Branch: refs/heads/ignite-573
Commit: 76e45aca730cad36f56baec080c04974f61ef1b0
Parents: d11b211
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Wed Mar 25 17:22:53 2015 -0700
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Wed Mar 25 17:22:53 2015 -0700

----------------------------------------------------------------------
 .../processors/service/GridServiceProcessor.java       |  4 ++--
 .../apache/ignite/messaging/GridMessagingSelfTest.java | 13 +++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76e45aca/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 31b5a85..335f8ac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -465,8 +465,8 @@ public class GridServiceProcessor extends GridProcessorAdapter {
             ServiceDescriptorImpl desc = new ServiceDescriptorImpl(dep);
 
             try {
-                GridServiceAssignments assigns = (GridServiceAssignments)cache.//flagOn(CacheFlag.GET_PRIMARY).
-                    get(new GridServiceAssignmentsKey(dep.configuration().getName()));
+                GridServiceAssignments assigns = (GridServiceAssignments)cache.getForcePrimary(
+                    new GridServiceAssignmentsKey(dep.configuration().getName()));
 
                 if (assigns != null) {
                     desc.topologySnapshot(assigns.assigns());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76e45aca/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
index c00ba52..4c844fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.messaging;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
@@ -193,7 +194,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
      * @throws Exception If error occurs.
      */
     public void testSendReceiveMessage() throws Exception {
-        final Collection<Object> rcvMsgs = new HashSet<>();
+        final Collection<Object> rcvMsgs = new GridConcurrentHashSet<>();
 
         final AtomicBoolean error = new AtomicBoolean(false); //to make it modifiable
 
@@ -354,7 +355,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
      * @throws Exception If error occurs.
      */
     public void testSendReceiveMessageWithStringTopic() throws Exception {
-        final Collection<Object> rcvMsgs = new HashSet<>();
+        final Collection<Object> rcvMsgs = new GridConcurrentHashSet<>();
 
         final AtomicBoolean error = new AtomicBoolean(false); //to make it modifiable
 
@@ -477,7 +478,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
      * @throws Exception If error occurs.
      */
     public void testSendReceiveMessageWithEnumTopic() throws Exception {
-        final Collection<Object> rcvMsgs = new HashSet<>();
+        final Collection<Object> rcvMsgs = new GridConcurrentHashSet<>();
 
         final AtomicBoolean error = new AtomicBoolean(false); //to make it modifiable
 
@@ -601,7 +602,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
      * @throws Exception If error occurs.
      */
     public void testRemoteListen() throws Exception {
-        final Collection<Object> rcvMsgs = new HashSet<>();
+        final Collection<Object> rcvMsgs = new GridConcurrentHashSet<>();
 
         final CountDownLatch rcvLatch = new CountDownLatch(4);
 
@@ -736,7 +737,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
             new TestMessage(MSG_2, 3000),
             new TestMessage(MSG_3));
 
-        final Collection<Object> rcvMsgs = new ArrayList<>(msgs.size());
+        final Collection<Object> rcvMsgs = new ConcurrentLinkedDeque<>();
 
         final AtomicBoolean error = new AtomicBoolean(false); //to make it modifiable
 
@@ -785,7 +786,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
      * @throws Exception If error occurs.
      */
     public void testRemoteListenWithIntTopic() throws Exception {
-        final Collection<Object> rcvMsgs = new HashSet<>();
+        final Collection<Object> rcvMsgs = new GridConcurrentHashSet<>();
 
         final AtomicBoolean error = new AtomicBoolean(false); //to make it modifiable
 


Mime
View raw message