Jokser commented on a change in pull request #6884: Ignite 12088
URL: https://github.com/apache/ignite/pull/6884#discussion_r326235831
 
 

 ##########
 File path: 
modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java
 ##########
 @@ -105,6 +110,60 @@
         cleanPersistenceDir();
     }
 
+    /**
+     * @throws Exception If failed
+     */
+    @Test
+    public void testGetorCreateLongCacheNameExceed235() throws Exception{
+        IgniteEx ignite = startGrid(0);
+        ignite.cluster().active(true);
+        final CacheConfiguration cfg = new 
CacheConfiguration(DEFAULT_CACHE_NAME);
+        String cacheName = GridTestUtils.randomString(250);
+        cfg.setName(cacheName);
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override
+            public Object call() throws Exception {
+                return ignite.getOrCreateCache(cfg);
+            }
+        }, IllegalArgumentException.class, "Ouch! Argument is invalid: Length 
of cache name can not exceed 235.");
+    }
+
+    /**
+     * @throws Exception If failed
+     */
+    @Test
+    public void testGetorCreateLongCacheGroupNameExceed235() throws Exception{
+        IgniteEx ignite = startGrid(0);
+        ignite.cluster().active(true);
+        final CacheConfiguration cfg = new 
CacheConfiguration(DEFAULT_CACHE_NAME);
+        String cacheName = GridTestUtils.randomString(30);
+        cfg.setName(cacheName);
+        cfg.setGroupName(GridTestUtils.randomString(236));
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override
+            public Object call() throws Exception {
+                return ignite.getOrCreateCache(cfg);
+            }
+        }, IllegalArgumentException.class, "Ouch! Argument is invalid: Length 
of cache group name can not exceed 235.");
+    }
+
+    /**
+     * @throws Exception If failed
+     */
+    @Test
+    public void testGetorCreateLongCacheNameLessThan235() throws Exception{
 
 Review comment:
   Don't think this test is needed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to