ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [01/59] [abbrv] ignite git commit: IGNITE-3488: Prohibited null as cache name. This closes #1790.
Date Fri, 28 Apr 2017 06:57:22 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 683303c98 -> 4787c8b96


http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetCommandSpec.scala
index abb0024..4b96035 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetCommandSpec.scala
@@ -25,7 +25,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
 import org.apache.ignite.visor.commands.cache.VisorCacheCommand._
 import org.apache.ignite.visor.{VisorRuntimeBaseSpec, visor}
-import org.jetbrains.annotations.Nullable
+import org.jetbrains.annotations.NotNull
 
 import scala.collection.JavaConversions._
 
@@ -47,7 +47,7 @@ class VisorCacheResetCommandSpec extends VisorRuntimeBaseSpec(2) {
 
         cfg.setIgniteInstanceName(name)
         cfg.setLocalHost("127.0.0.1")
-        cfg.setCacheConfiguration(cacheConfig(null), cacheConfig("cache"))
+        cfg.setCacheConfiguration(cacheConfig("default"), cacheConfig("cache"))
 
         val discoSpi = new TcpDiscoverySpi()
 
@@ -62,7 +62,7 @@ class VisorCacheResetCommandSpec extends VisorRuntimeBaseSpec(2) {
      * @param name Cache name.
      * @return Cache Configuration.
      */
-    def cacheConfig(@Nullable name: String): CacheConfiguration[Object, Object] = {
+    def cacheConfig(@NotNull name: String): CacheConfiguration[Object, Object] = {
         val cfg = new CacheConfiguration[Object, Object]
 
         cfg.setCacheMode(REPLICATED)
@@ -76,7 +76,7 @@ class VisorCacheResetCommandSpec extends VisorRuntimeBaseSpec(2) {
         it("should show correct result for default cache") {
             Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
 
-            val lock = Ignition.ignite("node-1").cache[Int, Int](null).lock(1)
+            val lock = Ignition.ignite("node-1").cache[Int, Int]("default").lock(1)
 
             lock.lock()
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8f9edebf/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java
b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java
index c635c20..763212d 100644
--- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java
+++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java
@@ -68,7 +68,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
      * @throws Exception Test exception.
      */
     public void testZeroMqPairSocket() throws Exception {
-        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(null))
{
+        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME))
{
             try (IgniteZeroMqStreamer streamer = newStreamerInstance(
                 dataStreamer, 1, ZeroMqTypeSocket.PAIR, ADDR, null);) {
                 executeStreamer(streamer, ZMQ.PAIR, null);
@@ -80,7 +80,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
      * @throws Exception Test exception.
      */
     public void testZeroMqSubSocket() throws Exception {
-        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(null))
{
+        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME))
{
             try (IgniteZeroMqStreamer streamer = newStreamerInstance(
                 dataStreamer, 3, ZeroMqTypeSocket.SUB, ADDR, TOPIC);) {
                 executeStreamer(streamer, ZMQ.PUB, TOPIC);
@@ -92,7 +92,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
      * @throws Exception Test exception.
      */
     public void testZeroMqPullSocket() throws Exception {
-        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(null))
{
+        try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME))
{
             try (IgniteZeroMqStreamer streamer = newStreamerInstance(
                 dataStreamer, 4, ZeroMqTypeSocket.PULL, ADDR, null);) {
                 executeStreamer(streamer, ZMQ.PUSH, null);
@@ -113,7 +113,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
         byte[] topic) throws Exception {
         streamer.setSingleTupleExtractor(new ZeroMqStringSingleTupleExtractor());
 
-        IgniteCache<Integer, String> cache = grid().cache(null);
+        IgniteCache<Integer, String> cache = grid().cache(DEFAULT_CACHE_NAME);
 
         CacheListener listener = subscribeToPutEvents();
 
@@ -192,7 +192,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
         // Listen to cache PUT events and expect as many as messages as test data items.
         CacheListener listener = new CacheListener();
 
-        ignite.events(ignite.cluster().forCacheNodes(null)).localListen(listener, EVT_CACHE_OBJECT_PUT);
+        ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).localListen(listener,
EVT_CACHE_OBJECT_PUT);
 
         return listener;
     }
@@ -203,7 +203,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest {
     private void unsubscribeToPutEvents(CacheListener listener) {
         Ignite ignite = grid();
 
-        ignite.events(ignite.cluster().forCacheNodes(null)).stopLocalListen(listener, EVT_CACHE_OBJECT_PUT);
+        ignite.events(ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME)).stopLocalListen(listener,
EVT_CACHE_OBJECT_PUT);
     }
 
     /**


Mime
View raw message