From 5b5a7e912473ae67d34354a69b71aa235aa82e02 Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Tue, 3 May 2011 02:26:08 -0400 Subject: [PATCH] "the old API was to pass the asset into process(), but that had some problems" according to preaction, re: WebGUI::AssetHelper::Cut->new now requiring an asset parameter. fixes www_processAssetHelper test; several others in there still fail for me. this fix fixes a WebGUI::Fork leak. I'm sure there are more. --- t/Admin.t | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/t/Admin.t b/t/Admin.t index e00eab75d..486a8bf2e 100644 --- a/t/Admin.t +++ b/t/Admin.t @@ -70,6 +70,8 @@ my $snip = $import->addChild( { $snip->commit; addToCleanup( $snip ); +ok(WebGUI::Test->waitForAllForks(10), "... Forks finished"); + #---------------------------------------------------------------------------- # Tests @@ -82,12 +84,15 @@ $mech->session->user({ userId => '3' }); # www_processAssetHelper $mech->get_ok( '/?op=admin;method=processAssetHelper;helperId=cut;assetId=' . $snip->getId ); -cmp_deeply( - JSON->new->decode( $mech->content ), - WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session )->process( $snip ), + +cmp_deeply( + map( { delete $_->{forkId}; $_ } JSON->new->decode( $mech->content )), + map( { delete $_->{forkId}; $_ } WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session, asset => $snip )->process( )), 'www_processAssetHelper', ); +ok(WebGUI::Test->waitForAllForks(10), "... Forks finished"); + # www_processPlugin $mech->get_ok( '/?op=admin;method=processPlugin;id=test' ); $output = $mech->content; @@ -237,6 +242,7 @@ cmp_deeply( 'www_searchAssets', ); +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); done_testing;