Subject: | Failing tests t/06timestamp.t and t/07date.t |
Hi,
I have experienced the following failures during test while trying to
install DBIx-Class-TimeStamp-0.12
t/05datetime.t ..... ok
# Failed test 'update and create timestamp'
# at t/06timestamp.t line 28.
# got: '2009-08-02T22:45:56'
# expected: '2009-08-02T22:45:55'
# Looks like you failed 1 test of 3.
t/06timestamp.t ....
# Failed test 'update and create timestamp'
# at t/07date.t line 28.
# got: '2009-08-02T22:45:58'
# expected: '2009-08-02T22:45:57'
# Looks like you failed 1 test of 3.
My perl - win32 strawbarry perl 5.8.9; however it does not seem to be a
win32 specific issue.
As you can see it is a sort of timing problem and does not happen always.
I think that with current implementation you cannot assume update and
create timestamps to be exactly the same.
Changing tests in the following way could solve this issue:
-is $row->t_updated, $row->t_created, 'update and create timestamp';
+cmp_ok($row->t_updated, '>=', $row->t_created, 'update and create
timestamp');
--
kmx