[Jifty-commit] r6985 - jifty/trunk/t/TestApp-Plugin-ActorMetadata/t

Jifty commits jifty-commit at lists.jifty.org
Mon May 11 19:03:59 EDT 2009


Author: alexmv
Date: Mon May 11 19:03:58 2009
New Revision: 6985

Modified:
   jifty/trunk/t/TestApp-Plugin-ActorMetadata/t/actormetadata.t

Log:
Fix a non-deterministic test which failed when load was too high

Modified: jifty/trunk/t/TestApp-Plugin-ActorMetadata/t/actormetadata.t
==============================================================================
--- jifty/trunk/t/TestApp-Plugin-ActorMetadata/t/actormetadata.t	(original)
+++ jifty/trunk/t/TestApp-Plugin-ActorMetadata/t/actormetadata.t	Mon May 11 19:03:58 2009
@@ -45,6 +45,7 @@
     'update_on is updated correctly' );
 mysleep( 3 );
 # update by bar
+$now = Jifty::DateTime->now;
 $post->current_user($user_bar);
 
 $post->set_title( 'bar' );
@@ -53,7 +54,7 @@
 is( $post->created_on->epoch, $created_on->epoch, 'created_on is not updated' );
 
 is( $post->updated_by->id, $user_bar->id, 'updated_by is not updated' );
-ok( abs( $post->updated_on->epoch - Jifty::DateTime->now->epoch ) < 2,
+ok( $post->updated_on->epoch >= $now->epoch,
     'update_on is updated' );
 
 # creator and created are columns of comment, post doesn't have those


More information about the Jifty-commit mailing list