Fixups for the tests. I moved the nested key checking into a TODO block. I'm
not sure how to handle them, as they may / may not exist in the %output hash. Sometimes they'll pass, sometimes they won't, depending upon the time you run it and the status of Spectre overall.
This commit is contained in:
parent
3e2bad5cb4
commit
dd53243b08
2 changed files with 22 additions and 17 deletions
|
|
@ -273,9 +273,6 @@ sub getJsonStatus {
|
|||
my ($kernel, $request, $self) = @_[KERNEL,ARG0,OBJECT];
|
||||
my ($sitename, $rsvp) = @$request;
|
||||
|
||||
# only return this site's info
|
||||
#return $kernel->call(IKC=>post=>$rsvp, '{}') unless $sitename;
|
||||
|
||||
my %queues = ();
|
||||
tie %queues, 'Tie::IxHash';
|
||||
%queues = (
|
||||
|
|
@ -291,11 +288,13 @@ sub getJsonStatus {
|
|||
if ($count > 0) {
|
||||
for my $queueItem ($queue->peek_items(sub {1})) {
|
||||
my($priority, $id, $instance) = @{$queueItem};
|
||||
# it's not a hash ref, we haven't seen it yet
|
||||
# The site's name in the list of %output keys isn't a hashref;
|
||||
# we haven't seen it yet
|
||||
if(ref $output{$instance->{sitename}} ne 'HASH') {
|
||||
$output{$instance->{sitename}} = {};
|
||||
}
|
||||
# it's not an array ref, we haven't seen it yet
|
||||
# The queue name in the $output{sitename} hashref isn't an
|
||||
# arrayref; we haven't seen it yet
|
||||
if(ref $output{$instance->{sitename}}{$queueName} ne 'ARRAY') {
|
||||
$output{$instance->{sitename}}{$queueName} = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue