2670 Commits

Author SHA1 Message Date
Dougal Matthews
4d5061c3e3 Allow users to set the test run concurrency
It will default to 0, which means testr will automatically set it based
on your CPU count. Allowing the user to set it with an environment
variable lets them control the resources used and more easily debug any
issues with tests impacting each other (by disabling concurrency).

Change-Id: Ib8274d307991ac3c25180609cb015894f0bf52b3
2017-03-07 15:02:10 +00:00
Jenkins
3af9a36104 Merge "Include the missing lines in the coverage report" 2017-03-07 11:22:52 +00:00
Jenkins
236ff7932d Merge "Don't use 'master' as that isn't always true" 2017-03-07 11:02:16 +00:00
Jenkins
8d9a2a6346 Merge "[doc] Changed the output fields in quickstart guide" 2017-03-07 08:35:09 +00:00
Dougal Matthews
7a929a9588 Include the missing lines in the coverage report
This should make it easier to see what files are different between the
two compared coverage reports.

Change-Id: I0367be79145ffb066c44342dcbe97e61a079d598
2017-03-07 08:31:41 +00:00
Dougal Matthews
bc40d42dcb Don't use 'master' as that isn't always true
We are only comparing against master if the parent of the commit is
master. This isn't true if another patch merges after this is proposed
or it is in a series of commits and based on another review.

Change-Id: I2d0f827552fb431cf78a03f77e18b77ed406efd8
2017-03-07 08:31:21 +00:00
Jenkins
0dc2850cce Merge "Add coverage erase to the cover report" 2017-03-06 12:33:18 +00:00
Sharat Sharma
6973f75d60 [doc] Changed the output fields in quickstart guide
As there are few more fields added to the client and the document
was not updated, this commit updates the output of each command
accordingly.

Change-Id: Ie5c87b269a58c79bf37c7a93b79d6068352b79bd
Closes-Bug: #1670329
2017-03-06 17:48:07 +05:30
Jenkins
24d87010f6 Merge "Fix update workflow by admin" 2017-03-06 11:20:58 +00:00
Jenkins
8b3d0bc632 Merge "Fix get_next_execution_time" 2017-03-06 09:59:01 +00:00
Jenkins
971e14e81e Merge "Use utcnow() in expired executions policy test" 2017-03-06 09:58:55 +00:00
Jenkins
39d2c0381c Merge "Every unit test creates and registers every OpenStack action" 2017-03-06 09:58:49 +00:00
Jenkins
f104fc5485 Merge "Verify the retry policy when passed in via variables" 2017-03-06 09:58:43 +00:00
Jenkins
5172405e48 Merge "Reduce the number of with-items and retried in the concurrency test" 2017-03-06 09:58:29 +00:00
Dougal Matthews
5023bd4773 Add coverage erase to the cover report
Change-Id: I559222d3b6340c24e9b7f9249096482d6564668f
2017-03-06 09:20:53 +00:00
Lingxian Kong
936452e08a Fix update workflow by admin
Change-Id: I38cada2e467d2b2b2ca0f332e9331caa2fc64f47
Closes-Bug: #1667174
2017-03-06 09:04:00 +00:00
Jenkins
f919666421 Merge "Add idempotent_id decorator to tempest testcases" 2017-03-05 11:46:59 +00:00
Jenkins
8f53d01fa3 Merge "Remove the delay from the direct workflow rerun tests" 2017-03-05 11:38:57 +00:00
Jenkins
be9a0d7264 Merge "Add idempotent_id decorator to tempest testcases" 2017-03-05 11:09:47 +00:00
Brad P. Crochet
f005100d16 Fix get_next_execution_time
get_next_execution_time was incorrectly modifying it's return value
based on a conversion from localtime to UTC. However, this function
should not be doing such a conversion. It could result in multiplying
a TZ error. Croniter doesn't care about TZ. It just applies a pattern
to a given start time; therefore, it should be up to the caller to
pass the proper time.

Also, start_time is now based on utcnow() instead of localtime now().

Change-Id: Ifbd63d9e1f56085928bede22ce4f2954e1b38991
Partial-Bug: #1654218
2017-03-03 09:25:02 -05:00
Jenkins
58b10ebb44 Merge "External OpenStack action mapping file support" 2017-03-03 13:37:11 +00:00
Jenkins
2f1eed88ce Merge "Updated from global requirements" 2017-03-03 13:37:05 +00:00
Jeremy Liu
36a7d8ebd0 Add idempotent_id decorator to tempest testcases
The idempotent_id decorator allows for tracking of tests even
after they have been renamed [1]. This patch adds idempotent_id
decorator to api related testcases for mistral_tempest_tests.

[1] https://github.com/openstack/tempest/blob/master/
    HACKING.rst#test-identification-with-idempotent-id

Change-Id: I70f5ec2e18fd0845b7189b26cb40b9b260126146
Partial-Implements: blueprint add-idempotentid
2017-03-03 20:54:24 +08:00
Brad P. Crochet
101f3ea524 Use utcnow() in expired executions policy test
This test fails if the TZ of the execution environment is not UTC. Using
utcnow() ensures that the tested values are the same as what comes from
the DB. The DB stores timestamps in UTC.

Change-Id: I70af0d8009b5fa35777961ed3189a80ddcee28b1
Partial-Bug: #1654218
2017-03-03 07:25:24 -05:00
Jenkins
7ecb6ad423 Merge "Remove output from list action executions API" 2017-03-03 12:24:05 +00:00
Dougal Matthews
4d1770004a Every unit test creates and registers every OpenStack action
That means around 1300 database inserts (or, attempted inserts, some seem to
fail) before every test. This is very slow. Only one of the tests
actually verifies the OpenStack actions are registered.

Recently I5ab01395c507fc857dca7cf08ab344a07def0dcf gave us a way to set
a different mapping file in the config. This change makes every test use
the much smaller test mapping file, rather than the default file.

Given that one test is checking specific actions being registered, these
were added to the test file to make that test pass. Once the OpenStack actions
are moved to mistral-extra this will improve again. The tempest tests
verify the actions load and tests a number of the OpenStack actions directly,
so our coverage of them isn't reduced.

From a brief test on my laptop, this reduces the unit test run time by
between 60 and 90 seconds.

Related-Bug: #1669511
Change-Id: Icc4ec5ef7d93d5ebb64f21c62d0bf7fc91e2f084
2017-03-03 11:52:20 +00:00
Jenkins
d6168c9572 Merge "Update docs for tasks function" 2017-03-03 11:49:49 +00:00
OpenStack Proposal Bot
7a9cfeebb7 Updated from global requirements
Change-Id: I72f363b1f6a1acce0662dde6694455da7145cb5c
2017-03-03 10:17:44 +00:00
yushangbin
4ea86fccf5 Add idempotent_id decorator to tempest testcases
The idempotent_id decorator allows for tracking of tests even
after they have been renamed [1]. This patch adds idempotent_id
decorator to scenario related testcases for mistral_tempest_tests.

[1] https://github.com/openstack/tempest/blob/master/
    HACKING.rst#test-identification-with-idempotent-id

Change-Id: I955cd8b063b5a5d7d94cbd769b93521e35c9649b
Partial-Implements: blueprint add-idempotentid
2017-03-03 17:21:37 +08:00
Dougal Matthews
d89a2d1524 Verify the retry policy when passed in via variables
Adding the verification to this test reduces it from 60 seconds to about
6 seconds.

Related-Bug: #1669511
Change-Id: Idc587fd2d92c82e95bc642989561d700ae1710c5
2017-03-03 08:00:30 +00:00
Dougal Matthews
4954593c2d Reduce the number of with-items and retried in the concurrency test
Each additional with-item value and retry added an extra second to test
test run but having this many didn't add any value. Reducing the number
but still making sure retries are exercised reduced the test time by
around 50%.

Related-Bug: #1669511
Change-Id: Ibc25bfad2d213a31a022ea59d8c2d1a36f2d75d7
2017-03-03 08:00:30 +00:00
Dougal Matthews
6eef45a775 Remove the delay from the direct workflow rerun tests
The 10 second delay was overly generous. This change reduces the test
run time by around 25-30 seconds.

Related-Bug: #1669511
Change-Id: I55ded366162b4124f795c341d4bae919b09f468e
2017-03-03 08:00:30 +00:00
Istvan Imre
91237c2baa External OpenStack action mapping file support
Release note and command line parameter added.
From now it is optional to list openstack modules in mapping file which
you would not include into supported action set.

Change-Id: I5ab01395c507fc857dca7cf08ab344a07def0dcf
2017-03-03 08:00:30 +00:00
Michal Gershenzon
77084f7de1 Update docs for tasks function
tasks function can be used to get all tasks in state error
of a given workflow execution and more.

Change-Id: I64e101bf36e0d865342e848723b610bfe23423d9
2017-03-02 16:32:08 +00:00
Jenkins
9571c5489b Merge "Correction in workflow state change handling" 2017-03-02 12:25:51 +00:00
Michal Gershenzon
861d572b23 Remove output from list action executions API
output field should be returned only when getting one action execution

Change-Id: I9913f4893b3eaf30faca1a747eeeda493dbc0fb2
Closes-Bug: #1610817
2017-03-02 10:40:37 +00:00
ricolin
66e67392ee Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: If087b99d336051916994ff442f9bade3fc5cae8e
2017-03-02 15:53:44 +08:00
Jenkins
b6b40cbbc1 Merge "Force Python 2 for documentation builds" 2017-03-01 07:18:12 +00:00
Jenkins
01dadd465b Merge "Update Dockerfile to use Xenial" 2017-03-01 07:18:07 +00:00
OpenStack Proposal Bot
0f6f7249b3 Updated from global requirements
Change-Id: I4e3f85a9b92c29ac1eeefed68cf01a6f04a2060a
2017-03-01 04:08:51 +00:00
Istvan Imre
11e275a3cb Correction in workflow state change handling
In case of workflow definition is deleted attached execution
could not change their state.
Solution is to remove unnecessary workflow definition queries
before execution state changes.

Change-Id: I2900388c8155e5ff0c117e0799df975588f80379
Closes-Bug: #1668523
2017-02-28 15:51:41 +01:00
Brad P. Crochet
a298d09e42 Update Dockerfile to use Xenial
The current state of Mistral no longer works on Trusty. This patch
updates to Xenial in order to fix the docker image build.

Change-Id: I2a778d43e2dca8eaa370d5a86008a170ffb98f54
Closes-Bug: #1664030
2017-02-24 10:03:21 -05:00
Dougal Matthews
b27e78676f Force Python 2 for documentation builds
The documentation will fail to build under Python 3 as some of the
Sphinx extensions are not compatible.

Change-Id: Ifefa59bf9d06d4aa84c0a440d2458cc297a50ec2
2017-02-17 13:20:54 +00:00
Renat Akhmerov
086a3d43fa Fix memory leak related to cached lookups
* It turned out that Mistral used a lot of memory because it
  used cached DB lookups for task executions (only task executions
  in a terminal state get cached) and the maximum size of the cache
  was too big, 20000 entries. One task execution in certain cases
  may take a lot of memory (e.g. several megabytes) so 20000 objects
  make memory footprint huge. Additionally, when a workflow completes
  we need to invalidate coresponding task executions in the cache.
  This didn't happen before this patch.
* This patch fixes the aforementioned issues by using partial
  invalidation of the cache and setting smaller cache size.
* Fixed "Starting workflow .." log statement to not print the entire
  structure of the workflow definition into the workflow log, only its
  name and input parameters
* Minor style fixes

Change-Id: I0ee300f631a4bdfa2f618c2a10048267f27b3345
Closes-bug: #1664864
2017-02-17 19:23:39 +07:00
Jenkins
6e5cbd3b5a Merge "Remove wrong licensing" 2017-02-16 06:55:49 +00:00
Jenkins
24ff5ed80e Merge "Fix doc build if git is absent" 2017-02-16 06:55:43 +00:00
Jenkins
dfdce70ee1 Merge "Fix for coverage job showing 0% coverage for kombu" 2017-02-15 11:10:30 +00:00
Jenkins
474a29a5e3 Merge "Add Keycloak authentication doc for client side" 2017-02-15 11:10:17 +00:00
Jenkins
d42379ec02 Merge "Add reno for tasks function" 2017-02-15 11:10:05 +00:00
Dawid Deja
51c784daef Fix for coverage job showing 0% coverage for kombu
0% coverage was due to unintended deletion of one
of __init__.py files. After adding it, some of
the tests failed, so I have to also fix them.

Change-Id: Iee094ffd24cc1397e84f5d7be4977efbd986e636
Closes-bug: 1664228
Closes-bug: 1664603
2017-02-14 16:18:38 +01:00