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 2020/10/07 08:40:47 UTC

[GitHub] [ignite] SwirMix opened a new pull request #8323: Ignite-13489. Start stop clients node. (without custom service)

SwirMix opened a new pull request #8323:
URL: https://github.com/apache/ignite/pull/8323


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


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



[GitHub] [ignite] SwirMix closed pull request #8323: Ignite-13489. Start stop clients node. (without custom service)

Posted by GitBox <gi...@apache.org>.
SwirMix closed pull request #8323:
URL: https://github.com/apache/ignite/pull/8323


   


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



[GitHub] [ignite] nizhikov commented on a change in pull request #8323: Ignite-13489. Start stop clients node. (without custom service)

Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #8323:
URL: https://github.com/apache/ignite/pull/8323#discussion_r500869759



##########
File path: modules/ducktests/tests/ignitetest/tests/client_in_out_test.py
##########
@@ -0,0 +1,189 @@
+# 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.
+
+"""
+This module contains client tests
+"""
+import time
+from ducktape.mark.resource import cluster
+from ignitetest.services.ignite_app import IgniteApplicationService
+from ignitetest.services.ignite import IgniteService
+from ignitetest.services.utils.control_utility import ControlUtility
+from ignitetest.services.utils.ignite_configuration.discovery import from_ignite_cluster
+from ignitetest.services.utils.ignite_configuration import IgniteConfiguration
+from ignitetest.utils import ignite_versions
+from ignitetest.utils.ignite_test import IgniteTest
+from ignitetest.utils.version import DEV_BRANCH, V_2_8_1, IgniteVersion
+
+
+# pylint: disable=W0223
+
+class ClientTest(IgniteTest):
+    """
+    CACHE_NAME - name of the cache to create for the test.
+    REPORT_NAME - the name of the tests.
+    PACING - the frequency of the operation on clients (ms).
+    JAVA_CLIENT_CLASS_NAME - running classname.
+    CLIENTS_WORK_TIME_S - clients working time (s).
+    ITERATION_COUNT - the number of iterations of starting and stopping client nodes (s).
+    CLUSTER_NODES - cluster size.
+    STATIC_CLIENTS_NUM - the number of permanently employed clients.
+    TEMP_CLIENTS_NUM - number of clients who come log in and out.
+    """
+
+    CACHE_NAME = "simple-tx-cache"
+    PACING = 10
+    JAVA_CLIENT_CLASS_NAME = "org.apache.ignite.internal.ducktest.tests.start_stop_client.SingleClientNode"
+
+    CLIENTS_WORK_TIME_S = 30
+    ITERATION_COUNT = 1
+    CLUSTER_NODES = 12
+    STATIC_CLIENTS_NUM = 2
+    TEMP_CLIENTS_NUM = 7
+
+    @cluster(num_nodes=CLUSTER_NODES)
+    @ignite_versions(str(DEV_BRANCH), str(V_2_8_1))
+    def test_ignite_start_stop(self, ignite_version):
+        """
+        test scenario
+        """
+        # prepare servers
+        servers_count = self.CLUSTER_NODES - self.STATIC_CLIENTS_NUM - self.TEMP_CLIENTS_NUM
+        # topology version after test
+        current_top_v = servers_count
+        fin_top_ver = servers_count + 2 * self.STATIC_CLIENTS_NUM + 2 * self.ITERATION_COUNT * self.TEMP_CLIENTS_NUM
+        server_cfg = IgniteConfiguration(version=IgniteVersion(ignite_version))
+        ignite = IgniteService(self.test_context, server_cfg, num_nodes=servers_count)
+        control_utility = ControlUtility(ignite, self.test_context)
+
+        # build client config
+        client_cfg = server_cfg._replace(client_mode=True, discovery_spi=from_ignite_cluster(ignite))
+        # prepare client services
+        static_clients = multi_nodes_builder(
+            self.JAVA_CLIENT_CLASS_NAME,
+            self.CACHE_NAME,
+            self.PACING,
+            self.test_context,
+            client_cfg,
+            self.STATIC_CLIENTS_NUM
+        )
+
+        temp_clients = multi_nodes_builder(
+            self.JAVA_CLIENT_CLASS_NAME,
+            self.CACHE_NAME,
+            self.PACING,
+            self.test_context,
+            client_cfg,
+            self.TEMP_CLIENTS_NUM
+        )
+        # start servers and check cluster
+        ignite.start()
+        ignite.await_event(f'servers={servers_count}',
+                           timeout_sec=60,
+                           from_the_beginning=True,
+                           backoff_sec=1)
+
+        # start static clients
+        start(static_clients)
+        static_clients[len(static_clients) - 1].await_event(f'servers={servers_count}',
+                                                            timeout_sec=60,
+                                                            from_the_beginning=True,
+                                                            backoff_sec=1)
+
+        current_top_v += self.STATIC_CLIENTS_NUM
+        check_topology(control_utility, current_top_v)
+
+        # check client counter
+        ignite.await_event(f'clients={self.STATIC_CLIENTS_NUM}',
+                           timeout_sec=60,
+                           from_the_beginning=True,
+                           backoff_sec=1)
+
+        # start stop temp_clients node. Check cluster.
+        i = 0

Review comment:
       Why do we need this declaration?




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



[GitHub] [ignite] SwirMix commented on pull request #8323: Ignite-13489. Start stop clients node. (without custom service)

Posted by GitBox <gi...@apache.org>.
SwirMix commented on pull request #8323:
URL: https://github.com/apache/ignite/pull/8323#issuecomment-704831011


     Event [IGNITE_APPLICATION_FINISHED\|IGNITE_APPLICATION_BROKEN] was not triggered in 10 seconds
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/dist-packages/ducktape/tests/runner_client.py", line 134, in run
       data = self.run_test()
     File "/usr/local/lib/python3.7/dist-packages/ducktape/tests/runner_client.py", line 192, in run_test
       return self.test_context.function(self.test)
     File "/usr/local/lib/python3.7/dist-packages/ducktape/mark/_mark.py", line 429, in wrapper
       return functools.partial(f, *args, **kwargs)(*w_args, **w_kwargs)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/tests/client_in_out_test.py", line 123, in test_ignite_start_stop
       temp_clients.stop()
     File "/usr/local/lib/python3.7/dist-packages/ducktape/services/background_thread.py", line 84, in stop
       super(BackgroundThreadService, self).stop()
     File "/usr/local/lib/python3.7/dist-packages/ducktape/services/service.py", line 281, in stop
       self.stop_node(node)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/ignite_app.py", line 78, in stop_node
       self.await_stopped(timeout_sec)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/ignite_app.py", line 72, in await_stopped
       self.__check_status("IGNITE_APPLICATION_FINISHED", timeout=timeout_sec)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/ignite_app.py", line 81, in __check_status
       self.await_event("%s\\|IGNITE_APPLICATION_BROKEN" % desired, timeout, from_the_beginning=True)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py", line 138, in await_event
       backoff_sec=backoff_sec)
     File "/opt/ignite-dev/modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py", line 125, in await_event_on_node
       err_msg="Event [%s] was not triggered in %d seconds" % (evt_message, timeout_sec))
     File "/usr/local/lib/python3.7/dist-packages/ducktape/cluster/remoteaccount.py", line 708, in wait_until
       allow_fail=True) == 0, **kwargs)
     File "/usr/local/lib/python3.7/dist-packages/ducktape/utils/util.py", line 41, in wait_until
       raise TimeoutError(err_msg() if callable(err_msg) else err_msg)
   ducktape.errors.TimeoutError: Event [IGNITE_APPLICATION_FINISHED\|IGNITE_APPLICATION_BROKEN] was not triggered in 10 seconds
   


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