Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
642bd8ce
Commit
642bd8ce
authored
Jan 14, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to quarantine tests
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f821a53b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
doc/development/testing_guide/flaky_tests.md
doc/development/testing_guide/flaky_tests.md
+12
-0
spec/spec_helper.rb
spec/spec_helper.rb
+5
-0
No files found.
doc/development/testing_guide/flaky_tests.md
View file @
642bd8ce
...
...
@@ -5,6 +5,18 @@
It's a test that sometimes fails, but if you retry it enough times, it passes,
eventually.
## Quarantined tests
Tests can be put in quarantine by assigning
`:quarantine`
metadata. This means
they will be skipped unless run with
`--tag quarantine`
. This can be used for
tests that are expected to fail while a fix is in progress (similar to how
[
`skip` or `pending`
](
https://relishapp.com/rspec/rspec-core/v/3-8/docs/pending-and-skipped-examples
)
can be used).
```
bin/rspec --tag quarantine
```
## Automatic retries and flaky tests detection
On our CI, we use [rspec-retry] to automatically retry a failing example a few
...
...
spec/spec_helper.rb
View file @
642bd8ce
...
...
@@ -132,6 +132,11 @@ RSpec.configure do |config|
Gitlab
::
ReleaseBlogPost
.
instance
.
instance_variable_set
(
:@url
,
'https://about.gitlab.com'
)
end
config
.
before
(
:example
,
:quarantine
)
do
# Skip tests in quarantine unless we explicitly focus on them.
skip
(
'In quarantine'
)
unless
config
.
inclusion_filter
[
:quarantine
]
end
config
.
before
(
:example
,
:request_store
)
do
RequestStore
.
begin!
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment