Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
e0490037
Commit
e0490037
authored
Mar 31, 2020
by
Francesc Guasch
Browse files
refactored some tests waiting for set time
parent
08e4da86
Changes
2
Hide whitespace changes
Inline
Side-by-side
t/lib/Test/Ravada.pm
View file @
e0490037
...
...
@@ -779,7 +779,10 @@ sub wait_request {
my
@req
=
_list_requests
();
rvd_back
->
_process_requests_dont_fork
(
$debug
)
if
!
$background
;
for
my
$req_id
(
@req
)
{
my
$req
=
Ravada::
Request
->
open
(
$req_id
);
my
$req
;
eval
{
$req
=
Ravada::
Request
->
open
(
$req_id
)
};
next
if
$@
&&
$@
=~
/I can't find id=$req_id/
;
die
$@
if
$@
;
next
if
$skip
{
$req
->
command
};
if
(
$req
->
status
ne
'
done
'
)
{
diag
("
Waiting for request
"
.
$req
->
id
.
"
"
.
$req
->
command
.
"
"
.
$req
->
status
...
...
t/vm/h20_hybernate_req.t
View file @
e0490037
...
...
@@ -37,7 +37,7 @@ for my $vm_name ( @{rvd_front->list_vm_types}) {
next
if
!
$domain
->
can_hybernate
();
for
my
$fork
(
0
,
1
)
{
my
$fork
=
0
;
$domain
->
start
(
$USER
)
if
!
$domain
->
is_active
;
for
(
1
..
10
)
{
last
if
$domain
->
is_active
;
...
...
@@ -57,8 +57,11 @@ for my $vm_name ( @{rvd_front->list_vm_types}) {
}
wait_request
(
background
=>
$fork
);
is
(
$req
->
status
,'
done
');
is
(
$req
->
error
,'');
$domain
=
rvd_back
->
search_domain
(
$domain
->
name
);
is
(
$domain
->
is_active
,
0
);
is
(
$domain
->
is_active
,
0
,"
Expecting domain
"
.
$domain
->
name
.
"
not active , fork=
$fork
"
);
$domain
->
start
(
$USER
)
if
!
$domain
->
is_active
;
if
(
!
$domain
->
is_active
)
{
...
...
@@ -68,8 +71,6 @@ for my $vm_name ( @{rvd_front->list_vm_types}) {
is
(
$domain
->
is_active
,
1
);
}
# for my $fork
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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