ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/29] incubator-ignite git commit: # ignite-709_3 do not create system caches on client nodes
Date Mon, 18 May 2015 09:31:15 GMT
# ignite-709_3 do not create system caches on client nodes


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

Branch: refs/heads/ignite-709_2
Commit: 07e29550b3ff0120d3cd536d05972062ad6f7482
Parents: d02cfe3
Author: sboikov <sboikov@gridgain.com>
Authored: Thu May 14 15:45:52 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu May 14 15:45:52 2015 +0300

----------------------------------------------------------------------
 .../IgniteClientDataStructuresAbstractTest.java | 45 ++++++++++++++++++++
 1 file changed, 45 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/07e29550/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java
index db16062..8aef0a6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteClientDataStructuresAbstractTest.java
@@ -230,6 +230,51 @@ public abstract class IgniteClientDataStructuresAbstractTest extends
GridCommonA
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testQueue() throws Exception {
+        Ignite clientNode = clientIgnite();
+
+        final Ignite srvNode = serverNode();
+
+        CollectionConfiguration colCfg = new CollectionConfiguration();
+
+        assertNull(clientNode.queue("q1", 0, null));
+
+        try (IgniteQueue<Integer> queue = clientNode.queue("q1", 0, colCfg)) {
+            assertNotNull(queue);
+
+            queue.add(1);
+
+            assertEquals(1, queue.poll().intValue());
+
+            IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Object>()
{
+                @Override public Object call() throws Exception {
+                    U.sleep(1000);
+
+                    IgniteQueue<Integer> queue0 = srvNode.queue("q1", 0, null);
+
+                    assertEquals(0, queue0.size());
+
+                    log.info("Add in queue.");
+
+                    queue0.add(2);
+
+                    return null;
+                }
+            });
+
+            log.info("Try take.");
+
+            assertEquals(2, queue.take().intValue());
+
+            log.info("Finished take.");
+
+            fut.get();
+        }
+    }
+
+    /**
      * @return Client node.
      */
     private Ignite clientIgnite() {


Mime
View raw message