[Bast-commits] r6775 - trunk/DBIx-Class-TimeStamp/t
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Tue Jun 23 18:48:33 GMT 2009
Author: jnapiorkowski
Date: 2009-06-23 18:48:33 +0000 (Tue, 23 Jun 2009)
New Revision: 6775
Modified:
trunk/DBIx-Class-TimeStamp/t/06timestamp.t
trunk/DBIx-Class-TimeStamp/t/07date.t
trunk/DBIx-Class-TimeStamp/t/08noclobber.t
Log:
more making sure tests do not pointless fail when we cross the second boundry
Modified: trunk/DBIx-Class-TimeStamp/t/06timestamp.t
===================================================================
--- trunk/DBIx-Class-TimeStamp/t/06timestamp.t 2009-06-23 18:44:10 UTC (rev 6774)
+++ trunk/DBIx-Class-TimeStamp/t/06timestamp.t 2009-06-23 18:48:33 UTC (rev 6775)
@@ -17,6 +17,9 @@
my $schema = DBIC::Test->init_schema;
my $row;
+my $t = time();
+Time::HiRes::sleep (int ($t) + 1 - $t);
+
$row = $schema->resultset('DBIC::Test::Schema::TestTime')
->create({ display_name => 'test record' });
Modified: trunk/DBIx-Class-TimeStamp/t/07date.t
===================================================================
--- trunk/DBIx-Class-TimeStamp/t/07date.t 2009-06-23 18:44:10 UTC (rev 6774)
+++ trunk/DBIx-Class-TimeStamp/t/07date.t 2009-06-23 18:48:33 UTC (rev 6775)
@@ -17,6 +17,9 @@
my $schema = DBIC::Test->init_schema;
my $row;
+my $t = time();
+Time::HiRes::sleep (int ($t) + 1 - $t);
+
$row = $schema->resultset('DBIC::Test::Schema::TestDate')
->create({ display_name => 'test record' });
Modified: trunk/DBIx-Class-TimeStamp/t/08noclobber.t
===================================================================
--- trunk/DBIx-Class-TimeStamp/t/08noclobber.t 2009-06-23 18:44:10 UTC (rev 6774)
+++ trunk/DBIx-Class-TimeStamp/t/08noclobber.t 2009-06-23 18:48:33 UTC (rev 6775)
@@ -20,6 +20,9 @@
my $last_week = DateTime->now() - DateTime::Duration->new( weeks => 1 );
+my $t = time();
+Time::HiRes::sleep (int ($t) + 1 - $t);
+
$row = $schema->resultset('DBIC::Test::Schema::TestDatetime')
->create({ display_name => 'test record', t_created => $last_week });
More information about the Bast-commits
mailing list