[Bps-public-commit] r17867 - Net-Trac/trunk/t

jesse at bestpractical.com jesse at bestpractical.com
Wed Jan 21 15:00:18 EST 2009


Author: jesse
Date: Wed Jan 21 15:00:18 2009
New Revision: 17867

Modified:
   Net-Trac/trunk/t/comments.t
   Net-Trac/trunk/t/update.t

Log:
Added sleep statements to deal with the fact that trac doesn't support two updates in the same second

Modified: Net-Trac/trunk/t/comments.t
==============================================================================
--- Net-Trac/trunk/t/comments.t	(original)
+++ Net-Trac/trunk/t/comments.t	Wed Jan 21 15:00:18 2009
@@ -37,13 +37,14 @@
 like($ticket->history->entries->[0]->content, qr/I like moose./, "The comment looks correct.");
 
 can_ok($ticket => 'comment');
+sleep(1); # trac can't accept two updates within 1 second on the same ticket.
 ok($ticket->comment( 'I like fish.' ), "Creating comment about fish.");
 
 can_ok( $ticket => 'comments' );
 is(@{$ticket->comments}, 2, "Got two comments.");
 like($ticket->comments->[1]->content, qr/fish/, "The comment looks correct.");
 like($ticket->comments->[0]->content, qr/moose/, "The previous comment looks correct.");
-
+sleep(1);
 ok($ticket->update( summary => 'Summary #1 updated' ), "Updating summary.");
 like($ticket->summary, qr/Summary #1 updated/, "The summary looks correct");
 is(@{$ticket->history->entries}, 3, "Got three history entries");

Modified: Net-Trac/trunk/t/update.t
==============================================================================
--- Net-Trac/trunk/t/update.t	(original)
+++ Net-Trac/trunk/t/update.t	Wed Jan 21 15:00:18 2009
@@ -44,7 +44,7 @@
 isa_ok($search->results->[0], 'Net::Trac::Ticket');
 is($search->results->[0]->id, 1, "Got id");
 is($search->results->[0]->status, 'closed', "Got status");
-
+sleep(1); # trac can't have two updates within one second
 ok($ticket->update( resolution => 'fixed' ), "resolution = fixed");
 is(@{$ticket->history->entries}, 2, "Got two history entries");
 is($ticket->resolution, 'fixed', "Got updated resolution");



More information about the Bps-public-commit mailing list