From 6e12a8f78a9cf00890f0b59b87f201bb3d772c0f Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Mon, 2 May 2011 17:59:07 -0400 Subject: [PATCH] simple cleanup logic for WebGUI::Fork; mark the fork "completed" even though it may not be just so that the next test that wants to do waitForAllForks doesn't get hung up on our fork --- lib/WebGUI/Test.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/WebGUI/Test.pm b/lib/WebGUI/Test.pm index 8c0be84c9..ea78275eb 100644 --- a/lib/WebGUI/Test.pm +++ b/lib/WebGUI/Test.pm @@ -639,6 +639,7 @@ were passed in. Currently able to destroy: WebGUI::DatabaseLink WebGUI::LDAPLink WebGUI::Inbox::Message + WebGUI::Fork Example call: @@ -767,6 +768,11 @@ Example call: 'SQL' => sub { (shift)->(); }, + 'WebGUI::Fork' => sub { + my $fork = shift; + my $id = $fork->getId; + session()->db->write("update Fork set finished = 1 where id = ?", [ $id ] ); + }, ); sub cleanupGuard {