tkalkirill commented on a change in pull request #9012:
URL: https://github.com/apache/ignite/pull/9012#discussion_r617403268



##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java
##########
@@ -151,6 +158,46 @@ public void testSingleNode() throws Exception {
         }
     }
 
+    /**
+     * Test verifies that Distributed Metastorage on client yields error if 
client is not connected to some cluster.
+     *
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDistributedMetastorageOperationsOnClient() throws 
Exception {
+        String clientName = "client0";
+
+        String key = "key";
+        String value = "value";
+
+        GridTestUtils.runAsync(() -> startGrid(clientName));

Review comment:
       U can use **GridAbstractTest#startClientGrid(int)**

##########
File path: 
modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java
##########
@@ -151,6 +158,46 @@ public void testSingleNode() throws Exception {
         }
     }
 
+    /**
+     * Test verifies that Distributed Metastorage on client yields error if 
client is not connected to some cluster.
+     *
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDistributedMetastorageOperationsOnClient() throws 
Exception {
+        String clientName = "client0";
+
+        String key = "key";
+        String value = "value";
+
+        GridTestUtils.runAsync(() -> startGrid(clientName));
+
+        GridTestUtils.waitForCondition(() -> {

Review comment:
       Maybe assertTrue ?

##########
File path: 
modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java
##########
@@ -668,6 +668,11 @@ public boolean knownNode(UUID nodeId) {
     public void sendCustomMessage(DiscoverySpiCustomMessage msg) {
         assert msg != null;
 
+        List<ClusterNode> nodes = rtState.top.topologySnapshot();
+
+        if (nodes.stream().allMatch(ClusterNode::isClient))

Review comment:
       Maybe use loop ?

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
##########
@@ -357,8 +357,9 @@ public static boolean stop(@Nullable String name, boolean 
cancel,
             grid.starterThread.interrupt();
         }
 
-        if (grid != null && grid.state() == STARTED) {
-            grid.stop(cancel, shutdown);
+        if (grid != null) {

Review comment:
       It seems that there is no difference and can not be changed.




-- 
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:
[email protected]


Reply via email to