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



##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);

Review comment:
       Is this method loads 2 green parallel but crossing and also red lines?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {
+        int threads = Runtime.getRuntime().availableProcessors() / 2;
+
+        long iterThread = size / threads;
+
+        CountDownLatch latch = new CountDownLatch(threads);
+
+        for (int i = 0; i < threads; i++)
+            new Thread(new UuidDataLoader(ignite, cacheName, latch, 
iterThread, dataSize))
+                    .start();

Review comment:
       reason for the new line?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {

Review comment:
       reason for the new line?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:

Review comment:
       1) is not None == [True, False].
   1.1) overcomplicated
   1.2) see no False cases.
   2) any reason to have this API without a check?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {
+        int threads = Runtime.getRuntime().availableProcessors() / 2;
+
+        long iterThread = size / threads;
+
+        CountDownLatch latch = new CountDownLatch(threads);
+
+        for (int i = 0; i < threads; i++)
+            new Thread(new UuidDataLoader(ignite, cacheName, latch, 
iterThread, dataSize))
+                    .start();
+
+        latch.await();
+    }
+
+    /** */
+    private static class UuidDataLoader implements Runnable {
+        /** Ignite. */
+        private final Ignite ignite;
+
+        /** Cache name. */
+        private final String cacheName;
+
+        /** Latch. */
+        private final CountDownLatch latch;
+
+        /** Iteration size. */
+        private final long iterSize;
+
+        /** Data size. */
+        private final int dataSize;
+
+        /** */
+        public UuidDataLoader(Ignite ignite, String cacheName, CountDownLatch 
latch, long iterSize, int dataSize) {
+            this.ignite = ignite;
+            this.cacheName = cacheName;
+            this.latch = latch;
+            this.iterSize = iterSize;
+            this.dataSize = dataSize;
+        }

Review comment:
       any reason to have this huge class instead of simple lambda?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):
+            match = re.search(r'/.*.txt', data)
+            return match[0]

Review comment:
       see no failure checks raizes exceptions

##########
File path: modules/ducktests/tests/ignitetest/tests/snapshot_test.py
##########
@@ -0,0 +1,113 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Module contains snapshot test.
+"""
+from ducktape.mark.resource import cluster
+
+from ignitetest.services.ignite import IgniteService
+from ignitetest.services.ignite_app import IgniteApplicationService
+from ignitetest.services.utils.control_utility import ControlUtility
+from ignitetest.services.utils.ignite_configuration import 
IgniteConfiguration, DataStorageConfiguration
+from ignitetest.services.utils.ignite_configuration.cache import 
CacheConfiguration
+from ignitetest.services.utils.ignite_configuration.data_storage import 
DataRegionConfiguration
+from ignitetest.services.utils.ignite_configuration.discovery import 
from_ignite_cluster
+from ignitetest.utils import ignite_versions
+from ignitetest.utils.ignite_test import IgniteTest
+from ignitetest.utils.version import DEV_BRANCH, IgniteVersion
+
+
+# pylint: disable=W0223
+class SnapshotTest(IgniteTest):
+    """
+    Test Snapshot.
+    """
+    NUM_NODES = 4
+
+    SNAPSHOT_NAME = "test_snap"

Review comment:
       snapchat?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {
+        int threads = Runtime.getRuntime().availableProcessors() / 2;
+
+        long iterThread = size / threads;
+
+        CountDownLatch latch = new CountDownLatch(threads);
+
+        for (int i = 0; i < threads; i++)
+            new Thread(new UuidDataLoader(ignite, cacheName, latch, 
iterThread, dataSize))
+                    .start();
+
+        latch.await();
+    }
+
+    /** */
+    private static class UuidDataLoader implements Runnable {
+        /** Ignite. */
+        private final Ignite ignite;
+
+        /** Cache name. */
+        private final String cacheName;
+
+        /** Latch. */
+        private final CountDownLatch latch;
+
+        /** Iteration size. */
+        private final long iterSize;
+
+        /** Data size. */
+        private final int dataSize;
+
+        /** */
+        public UuidDataLoader(Ignite ignite, String cacheName, CountDownLatch 
latch, long iterSize, int dataSize) {
+            this.ignite = ignite;
+            this.cacheName = cacheName;
+            this.latch = latch;
+            this.iterSize = iterSize;
+            this.dataSize = dataSize;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void run() {
+            try (IgniteDataStreamer<UUID, byte[]> dataStreamer = 
ignite.dataStreamer(cacheName)) {
+                dataStreamer.autoFlushFrequency(100L);
+
+                for (long i = 0L; i <= iterSize; i++)
+                    dataStreamer.addData(UUID.randomUUID(), new 
byte[dataSize]);

Review comment:
       any reason to generate data instead of using UUID as a value too?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {
+        int threads = Runtime.getRuntime().availableProcessors() / 2;
+
+        long iterThread = size / threads;
+
+        CountDownLatch latch = new CountDownLatch(threads);
+
+        for (int i = 0; i < threads; i++)
+            new Thread(new UuidDataLoader(ignite, cacheName, latch, 
iterThread, dataSize))
+                    .start();
+
+        latch.await();
+    }
+
+    /** */
+    private static class UuidDataLoader implements Runnable {
+        /** Ignite. */
+        private final Ignite ignite;
+
+        /** Cache name. */
+        private final String cacheName;
+
+        /** Latch. */
+        private final CountDownLatch latch;
+
+        /** Iteration size. */
+        private final long iterSize;
+
+        /** Data size. */
+        private final int dataSize;
+
+        /** */
+        public UuidDataLoader(Ignite ignite, String cacheName, CountDownLatch 
latch, long iterSize, int dataSize) {
+            this.ignite = ignite;
+            this.cacheName = cacheName;
+            this.latch = latch;
+            this.iterSize = iterSize;
+            this.dataSize = dataSize;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void run() {
+            try (IgniteDataStreamer<UUID, byte[]> dataStreamer = 
ignite.dataStreamer(cacheName)) {
+                dataStreamer.autoFlushFrequency(100L);

Review comment:
       what is the reason to change defaults?

##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.ducktest.tests.load;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication;
+
+/**
+ * Loading random uuids to cache.
+ */
+public class UuidDataLoaderApplication extends IgniteAwareApplication {
+    /** {@inheritDoc} */
+    @Override public void run(JsonNode jNode) throws InterruptedException {
+        String cacheName = jNode.get("cacheName").asText();
+
+        long size = jNode.get("size").asLong();
+
+        int dataSize = jNode.get("dataSize").asInt();
+
+        markInitialized();
+
+        long start = System.currentTimeMillis();
+
+        loadParallel(ignite, cacheName, size, dataSize);
+
+        recordResult("DURATION", System.currentTimeMillis() - start);
+
+        markFinished();
+    }
+
+    /** */
+    private void loadParallel(Ignite ignite, String cacheName, long size, int 
dataSize)
+            throws InterruptedException {
+        int threads = Runtime.getRuntime().availableProcessors() / 2;

Review comment:
       Why 2, not 3 or 5?
   Will this suit non-HT processors?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):

Review comment:
       any reason to have this if?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):
+            match = re.search(r'/.*.txt', data)
+            return match[0]
+
+        return data
+
+    def snapshot_create(self, snapshot_name: str, sync_mode: bool = True, 
time_out: int = 60):
+        """
+        Create snapshot.
+        """
+        res = self.__run(f"--snapshot create {snapshot_name}")
+
+        self.logger.info(res)
+
+        if ("Command [SNAPSHOT] finished with code: 0" in res) & sync_mode:
+            self.await_snapshot(snapshot_name, time_out)
+
+    def await_snapshot(self, snapshot_name: str, time_out=60):
+        """
+        Waiting for the snapshot to complete.
+        """
+        delta_time = datetime.now() + timedelta(seconds=time_out)
+
+        while datetime.now() < delta_time:
+            for node in self._cluster.nodes:
+                mbean = JmxClient(node).find_mbean('snapshot')
+                start_time = int(list(mbean.LastSnapshotStartTime)[0])
+                end_time = int(list(mbean.LastSnapshotEndTime)[0])
+                err_msg = list(mbean.LastSnapshotErrorMessage)[0]
+                name = list(mbean.LastSnapshotName)[0]
+
+                if (snapshot_name == name) & (0 < start_time < end_time) & 
(err_msg == ''):
+                    return

Review comment:
       so, you going to finish checks on first equality?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:

Review comment:
       Same question 🥇 

##########
File path: 
modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py
##########
@@ -45,13 +47,15 @@ def init_persistent(self, node):
         """
         node.account.mkdirs(self.PERSISTENT_ROOT)
         node.account.mkdirs(self.TEMP_DIR)
+        node.account.mkdirs(self.PATH_TO_LOGS_DIR)
 
 
 class IgnitePersistenceAware(PersistenceAware):
     """
     This class contains Ignite persistence artifacts
     """
     WORK_DIR = os.path.join(PersistenceAware.PERSISTENT_ROOT, "work")
+    SNAPSHOT = os.path.join(WORK_DIR, "snapshots")

Review comment:
       So, we have the whole snapshot encapsulated to this string, perfect!
   But this contains "*snapshotS", do we have a typo here?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):
+            match = re.search(r'/.*.txt', data)
+            return match[0]
+
+        return data
+
+    def snapshot_create(self, snapshot_name: str, sync_mode: bool = True, 
time_out: int = 60):

Review comment:
       "timeout" and "time out" has a different meaning

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):
+            match = re.search(r'/.*.txt', data)
+            return match[0]
+
+        return data
+
+    def snapshot_create(self, snapshot_name: str, sync_mode: bool = True, 
time_out: int = 60):
+        """
+        Create snapshot.
+        """
+        res = self.__run(f"--snapshot create {snapshot_name}")
+
+        self.logger.info(res)
+
+        if ("Command [SNAPSHOT] finished with code: 0" in res) & sync_mode:
+            self.await_snapshot(snapshot_name, time_out)
+
+    def await_snapshot(self, snapshot_name: str, time_out=60):
+        """
+        Waiting for the snapshot to complete.
+        """
+        delta_time = datetime.now() + timedelta(seconds=time_out)
+
+        while datetime.now() < delta_time:
+            for node in self._cluster.nodes:
+                mbean = JmxClient(node).find_mbean('snapshot')
+                start_time = int(list(mbean.LastSnapshotStartTime)[0])
+                end_time = int(list(mbean.LastSnapshotEndTime)[0])
+                err_msg = list(mbean.LastSnapshotErrorMessage)[0]
+                name = list(mbean.LastSnapshotName)[0]
+
+                if (snapshot_name == name) & (0 < start_time < end_time) & 
(err_msg == ''):

Review comment:
       &?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -127,6 +131,71 @@ def tx_kill(self, **kwargs):
         res = self.__parse_tx_list(output)
         return res if res else output
 
+    def validate_indexes(self, check_assert: bool = None):
+        """
+        Validate indexes.
+        """
+        data = self.__run("--cache validate_indexes")
+
+        if check_assert is not None:
+            assert (('no issues found.' in data) == check_assert), data
+
+    def idle_verify(self, check_assert: bool = None):
+        """
+        Idle verify.
+        """
+        data = self.__run("--cache idle_verify")
+
+        if check_assert is not None:
+            assert (('idle_verify check has finished, no conflicts have been 
found.' in data) == check_assert), data
+
+    def idle_verify_dump(self, node=None, return_path: bool = False):
+        """
+        Idle verify dump.
+        """
+        data = self.__run("--cache idle_verify --dump", node=node)
+
+        if return_path & ('VisorIdleVerifyDumpTask successfully' in data):
+            match = re.search(r'/.*.txt', data)
+            return match[0]
+
+        return data
+
+    def snapshot_create(self, snapshot_name: str, sync_mode: bool = True, 
time_out: int = 60):
+        """
+        Create snapshot.
+        """
+        res = self.__run(f"--snapshot create {snapshot_name}")
+
+        self.logger.info(res)

Review comment:
       useless sout until it has prefix.

##########
File path: 
modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py
##########
@@ -28,12 +28,14 @@ class PersistenceAware:
     """
     # Root directory for persistent output
     PERSISTENT_ROOT = "/mnt/service"
-    STDOUT_STDERR_CAPTURE = os.path.join(PERSISTENT_ROOT, "console.log")
     TEMP_DIR = os.path.join(PERSISTENT_ROOT, "tmp")
+    PATH_TO_LOGS_DIR = os.path.join(PERSISTENT_ROOT, "logs")

Review comment:
       THIS_IS_A_STRING_REPRESENTS_PATH_TO_LOGS_DIR

##########
File path: modules/ducktests/tests/ignitetest/services/ignite_app.py
##########
@@ -53,6 +53,9 @@ def start(self):
 
         self.__check_status("IGNITE_APPLICATION_INITIALIZED", 
timeout=self.timeout_sec)
 
+    def wait(self, timeout_sec=600):

Review comment:
       Do we need this method?




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