Clean up all temporary session info in Session/Scratch.t

Add a preliminary run of DeleteExpiredSessions to DeleteExpiredSessions.t
to clean up any old, funky sessions which might just be lying around
and interfering with the test.
This commit is contained in:
Colin Kuskie 2008-01-03 18:37:34 +00:00
parent 047b0c5d3e
commit b309d108dc
2 changed files with 9 additions and 4 deletions

View file

@ -119,9 +119,11 @@ is($sessionBank[2]->scratch->deleteNameByValue('falseValue',''), 1, "deleteNameB
END {
$session->scratch->deleteAll;
foreach my $wgSess ($newSession, @sessionBank, $session) {
foreach my $wgSess ($newSession, @sessionBank) {
if (defined $wgSess and ref $wgSess eq 'WebGUI::Session') {
diag "Closing session";
$wgSess->scratch->deleteAll;
$wgSess->var->end;
$wgSess->close;
}
}