Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
deckard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knot projects
deckard
Commits
c09c4076
Verified
Commit
c09c4076
authored
Aug 23, 2018
by
Štěpán Balážik
Committed by
Petr Špaček
Dec 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry tests which failed due to load
parent
d51ca57a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
deckard.py
deckard.py
+1
-1
deckard_pytest.py
deckard_pytest.py
+13
-2
No files found.
deckard.py
View file @
c09c4076
...
...
@@ -372,7 +372,7 @@ def run_testcase(daemons, case, root_addr, addr_family, prog_under_test_ip):
# leads the resolver to close the port and to the test failing in the
# end. We partially detect these by checking the PCAP for ICMP packets.
if
check_for_icmp
():
logging
.
e
rror
(
"Deckard is under load.
\
raise
DeckardUnderLoadE
rror
(
"Deckard is under load.
\
Other errors might be false negatives.
\
Consider retrying the job later."
)
raise
ValueError
(
'the scenario does not define all necessary answers (see error log)'
)
deckard_pytest.py
View file @
c09c4076
import
logging
import
os
import
subprocess
import
random
import
sys
import
time
import
pytest
...
...
@@ -33,13 +35,22 @@ logging.getLogger("augeas").setLevel(logging.ERROR)
check_platform
()
def
run_test
(
path
,
qmin
,
config
):
def
run_test
(
path
,
qmin
,
config
,
retries
=
0
):
set_coverage_env
(
path
,
qmin
)
try
:
del
os
.
environ
[
"SOCKET_WRAPPER_DIR"
]
except
KeyError
:
pass
deckard
.
process_file
(
path
,
qmin
,
config
)
try
:
deckard
.
process_file
(
path
,
qmin
,
config
)
except
deckard
.
DeckardUnderLoadError
as
e
:
if
retries
<
3
:
logging
.
error
(
"Deckard under load. Retrying…"
)
# Exponential backoff
time
.
sleep
((
2
**
(
retries
+
1
))
+
(
random
.
randint
(
0
,
1000
)
/
1000
))
run_test
(
path
,
qmin
,
config
,
retries
+
1
)
else
:
raise
e
def
test_passes_qmin_on
(
scenario
):
...
...
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