anton-vinogradov commented on a change in pull request #8137:
URL: https://github.com/apache/ignite/pull/8137#discussion_r468462238



##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -105,18 +105,22 @@ def deactivate(self):
 
     @staticmethod
     def __parse_cluster_state(output):
-        state_pattern = re.compile("Cluster state: ([^\\s]+)")
-        topology_pattern = re.compile("Current topology version: (\\d+)")
-        baseline_pattern = 
re.compile("Consistent(Id|ID)=([^\\s]+),\\sS(tate|TATE)=([^\\s]+),?(\\sOrder=(\\d+))?")
+        state_pattern = re.compile("Cluster state: (?P<cluster_state>[^\\s]+)")
+        topology_pattern = re.compile("Current topology version: 
(?P<topology_version>\\d+)")
+        baseline_pattern = 
re.compile("Consistent(Id|ID)=(?P<consistent_id>[^\\s]+),\\sS(tate|TATE)=(?P<state>[^\\s]+),"
+                                      "?(\\sOrder=(?P<order>\\d+))?")
 
         match = state_pattern.search(output)
-        state = match.group(1) if match else None
+        state = match.group("cluster_state") if match else None
 
         match = topology_pattern.search(output)
-        topology = int(match.group(1)) if match else None
+        topology = int(match.group("topology_version")) if match else None
 
-        baseline = [BaselineNode(consistent_id=m[1], state=m[3], 
order=int(m[5]) if m[5] else None)
-                    for m in baseline_pattern.findall(output)]
+        baseline = []
+        for match in baseline_pattern.finditer(output):

Review comment:
       you changing the type and content. 
   brief reading may (will) confuse the reader.




----------------------------------------------------------------
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