You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/03/26 11:44:25 UTC

[GitHub] [ignite] Jokser commented on a change in pull request #6009: IGNITE-11011 intermediate commit for discovery data processing sequen…

Jokser commented on a change in pull request #6009: IGNITE-11011 intermediate commit for discovery data processing sequen…
URL: https://github.com/apache/ignite/pull/6009#discussion_r269060309
 
 

 ##########
 File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDiscoDataHandlingInNewClusterTest.java
 ##########
 @@ -135,31 +161,50 @@
      * See related ticket <a href="https://issues.apache.org/jira/browse/IGNITE-10878">IGNITE-10878</a>.
      */
     @Test
-    public void testNewClusterFiltersDiscoveryDataReceivedFromStoppedCluster() throws Exception {
+    public void testNewClusterIgnoresDiscoDataFromStopped_SameStaticConfig() throws Exception {
         IgniteEx ig0 = startGrid(NODE_1_CONS_ID);
 
         prepareDynamicCaches(ig0);
 
         IgniteEx ig1 = startGrid(NODE_2_CONS_ID);
 
-        verifyCachesAndGroups(ig1);
+        verifyCachesAndGroups(ig1, Arrays.asList(new String[] {STATIC_CACHE_NAME_1, STATIC_CACHE_NAME_3}));
 
         IgniteEx ig2 = startGrid(NODE_3_CONS_ID);
 
-        verifyCachesAndGroups(ig2);
+        verifyCachesAndGroups(ig2, Arrays.asList(new String[] {STATIC_CACHE_NAME_1, STATIC_CACHE_NAME_3}));
 
         IgniteEx client = startGrid("client01");
 
-        verifyCachesAndGroups(client);
+        verifyCachesAndGroups(client, Arrays.asList(new String[] {STATIC_CACHE_NAME_1, STATIC_CACHE_NAME_3}));
+    }
+
+    /**
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testNewClusterIgnoresDiscoDataFromStopped_DifferentStaticConfig() throws Exception {
+        IgniteEx ig0 = startGrid(NODE_1_CONS_ID);
+
+        prepareDynamicCaches(ig0);
+
+        IgniteEx ig1 = startGrid(NODE_4_DIFF_STATIC_CONFIG);
+
+        verifyCachesAndGroups(ig1, Arrays.asList(new String[] {STATIC_CACHE_NAME_1, STATIC_CACHE_NAME_2}));
+
+        IgniteEx client = startGrid(CLIENT_WITH_DIFF_CONFIG);
+
+        verifyCachesAndGroups(client, Arrays.asList(new String[] {STATIC_CACHE_NAME_1, STATIC_CACHE_NAME_2}));
     }
 
     /** */
-    private void verifyCachesAndGroups(IgniteEx ignite) {
+    private void verifyCachesAndGroups(IgniteEx ignite, Collection<String> cacheNames) {
         Map<String, DynamicCacheDescriptor> caches = ignite.context().cache().cacheDescriptors();
 
-        assertEquals(2, caches.size());
-        caches.keySet().contains(GridCacheUtils.UTILITY_CACHE_NAME);
-        caches.keySet().contains(STATIC_CACHE_NAME);
+        assertEquals(3, caches.size());
 
 Review comment:
   I think it's safer to use cacheNames.size() + 1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services