Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
3f660b0d
Commit
3f660b0d
authored
Oct 15, 2013
by
Matthieu Muffato
Browse files
bugfix: the query has to be re-substituted for each job
parent
37763a79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
+3
-4
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlHealthcheck.pm
View file @
3f660b0d
...
...
@@ -75,14 +75,13 @@ sub _validate_tests {
foreach
my
$test
(
@
{
$self
->
param
('
tests
')})
{
die
"
The SQL query must be provided
"
unless
$test
->
{
query
};
die
"
The description must be provided
"
unless
$test
->
{
description
};
$test
->
{
query
}
=
$self
->
param_substitute
(
$test
->
{
query
});
$test
->
{
subst_
query
}
=
$self
->
param_substitute
(
$test
->
{
query
});
my
$expected_size
=
$test
->
{
expected_size
}
||
'';
unless
(
$expected_size
=~
/^\s*(=|==|>|>=|<|<=|<>|!=|)\s*(\d*)\s*$/
)
{
die
"
Cannot interpret the 'expected_size' parameter: '
$expected_size
'
";
}
$test
->
{
logical_test
}
=
$
1
||
'
=
';
$test
->
{
reference_size
}
=
$
2
||
'
0
';
delete
$test
->
{
expected_size
};
}
}
...
...
@@ -100,7 +99,7 @@ sub run {
foreach
my
$test
(
@
{
$self
->
param
('
tests
')})
{
push
@failures
,
$test
unless
$self
->
_run_test
(
$test
);
}
die
"
The following tests have failed:
\n
"
.
join
('',
map
{
sprintf
("
- %s
\n
> %s
\n
",
$_
->
{
description
},
$_
->
{
query
})}
@failures
)
if
@failures
;
die
"
The following tests have failed:
\n
"
.
join
('',
map
{
sprintf
("
- %s
\n
> %s
\n
",
$_
->
{
description
},
$_
->
{
subst_
query
})}
@failures
)
if
@failures
;
}
...
...
@@ -116,7 +115,7 @@ sub _run_test {
my
$test
=
shift
@_
;
my
$description
=
$test
->
{
description
};
my
$query
=
$test
->
{
query
};
my
$query
=
$test
->
{
subst_
query
};
my
$reference_size
=
$test
->
{
reference_size
};
my
$logical_test
=
$test
->
{
logical_test
};
...
...
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