Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
142c92cc
Commit
142c92cc
authored
May 11, 2021
by
Francesc Guasch
Browse files
refactor(test): check if shutdown requests exists
parent
7ac07ae5
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/vm/t10_timeout.t
View file @
142c92cc
...
...
@@ -42,17 +42,13 @@ sub test_run_timeout {
is
(
$clone
->
run_timeout
(),
$timeout
);
$clone
->
start
(
user
=>
$USER
);
is
(
scalar
(
$clone
->
list_requests
(
1
)),
2
)
or
exit
;
is
(
$clone
->
is_active
,
1
);
rvd_back
->
_process_all_requests_dont_fork
();
is
(
$clone
->
is_active
,
1
);
for
(
1
..
$timeout
+
60
)
{
last
if
!
$clone
->
is_active
||
!
scalar
(
$clone
->
list_requests
(
1
));
sleep
1
;
rvd_back
->
_process_all_requests_dont_fork
();
}
is
(
$clone
->
is_active
,
0
,
"
Expecting
"
.
$clone
->
name
.
"
timed out shutdown
")
or
exit
;
my
@requests
=
$clone
->
list_requests
(
1
);
my
(
$req
)
=
grep
{
$_
->
command
eq
'
shutdown
'
}
@requests
;
ok
(
$req
,
"
Expecting shutdown requested
"
.
Dumper
(
$req
,[
map
{
[
$_
->
command
,
$_
->
at_time
]
}
@requests
]))
and
do
{
is
(
$req
->
args
('
id_domain
'),
$clone
->
id
);
my
$at
=
$req
->
at_time
();
ok
(
$at
>
time
(),"
Expecting at in the future
"
.
(
$at
-
time
));
};
$clone
->
remove
(
user_admin
);
$domain
->
remove
(
user_admin
);
...
...
Write
Preview
Supports
Markdown
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