Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
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
Łukasz Nowak
kedifa
Commits
f4d3ac63
Commit
f4d3ac63
authored
Jul 31, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Give more time for servers to start
Also improve message in case of failure.
parent
c89c31a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
kedifa/test.py
kedifa/test.py
+10
-6
No files found.
kedifa/test.py
View file @
f4d3ac63
...
@@ -157,8 +157,9 @@ class KedifaMixinCaucase(KedifaMixin):
...
@@ -157,8 +157,9 @@ class KedifaMixinCaucase(KedifaMixin):
self
.
caucase_runtime
.
start
()
self
.
caucase_runtime
.
start
()
self
.
assertTrue
(
self
.
caucase_runtime
.
is_alive
())
self
.
assertTrue
(
self
.
caucase_runtime
.
is_alive
())
self
.
caucase_url
=
'http://[%s]:%s'
%
(
ip
,
port
)
self
.
caucase_url
=
'http://[%s]:%s'
%
(
ip
,
port
)
# give some time for caucase to be available
# give 5s for caucase to be available
for
i
in
range
(
20
):
b
=
time
.
time
()
for
i
in
range
(
50
):
try
:
try
:
requests
.
get
(
self
.
caucase_url
)
requests
.
get
(
self
.
caucase_url
)
except
BaseException
:
except
BaseException
:
...
@@ -167,7 +168,8 @@ class KedifaMixinCaucase(KedifaMixin):
...
@@ -167,7 +168,8 @@ class KedifaMixinCaucase(KedifaMixin):
else
:
else
:
break
break
else
:
else
:
raise
self
.
fail
(
'Caucase not available after %.2fs seconds'
%
(
time
.
time
()
-
b
))
def
setUpKey
(
self
,
common_name
):
def
setUpKey
(
self
,
common_name
):
# create key for the service and keep its downloaded ca_crt
# create key for the service and keep its downloaded ca_crt
...
@@ -230,8 +232,9 @@ class KedifaMixinCaucase(KedifaMixin):
...
@@ -230,8 +232,9 @@ class KedifaMixinCaucase(KedifaMixin):
self
.
kedifa_runtime
.
start
()
self
.
kedifa_runtime
.
start
()
self
.
assertTrue
(
self
.
kedifa_runtime
.
is_alive
())
self
.
assertTrue
(
self
.
kedifa_runtime
.
is_alive
())
# give some time for KeDiFa to be available
# give 5s for KeDiFa to be available
for
i
in
range
(
5
):
b
=
time
.
time
()
for
i
in
range
(
50
):
try
:
try
:
self
.
requests_get
(
self
.
kedifa_url
+
'ping'
)
self
.
requests_get
(
self
.
kedifa_url
+
'ping'
)
except
BaseException
:
except
BaseException
:
...
@@ -239,7 +242,8 @@ class KedifaMixinCaucase(KedifaMixin):
...
@@ -239,7 +242,8 @@ class KedifaMixinCaucase(KedifaMixin):
else
:
else
:
break
break
else
:
else
:
raise
self
.
fail
(
'Kedifa not available after %.2fs seconds'
%
(
time
.
time
()
-
b
))
def
reserveReference
(
self
,
*
args
,
**
kwargs
):
def
reserveReference
(
self
,
*
args
,
**
kwargs
):
result
=
requests
.
post
(
result
=
requests
.
post
(
...
...
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