Test Failed
Push — master ( e380d0...f5671d )
by W
02:58
created

st2tests/integration/orquesta/test_performance.py (1 issue)

1
# -*- coding: utf-8 -*-
2
3
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
4
# contributor license agreements.  See the NOTICE file distributed with
5
# this work for additional information regarding copyright ownership.
6
# The ASF licenses this file to You under the Apache License, Version 2.0
7
# (the "License"); you may not use this file except in compliance with
8
# the License.  You may obtain a copy of the License at
9
#
10
#     http://www.apache.org/licenses/LICENSE-2.0
11
#
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
17
18
from __future__ import absolute_import
19
20
import eventlet
21
22
from integration.orquesta import base
23
from six.moves import range
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in range.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
24
25
from st2common.constants import action as ac_const
26
27
28
class WiringTest(base.TestWorkflowExecution):
29
30
    def test_concurrent_load(self):
31
        load_count = 3
32
        delay_poll = load_count * 5
33
34
        wf_name = 'examples.orquesta-mock-create-vm'
35
        wf_input = {'vm_name': 'demo1'}
36
        exs = [self._execute_workflow(wf_name, wf_input) for i in range(load_count)]
37
38
        eventlet.sleep(delay_poll)
39
40
        for ex in exs:
41
            e = self._wait_for_completion(ex)
42
            self.assertEqual(e.status, ac_const.LIVEACTION_STATUS_SUCCEEDED)
43
            self.assertIn('output', e.result)
44
            self.assertIn('vm_id', e.result['output'])
45