Skip to content

Commit

Permalink
Item11983: Add a 1-second forgiveness on the time
Browse files Browse the repository at this point in the history
On some systems the file timestamp and topicinfo are off by one second.
This might be due to system workload, adding a bit of slack to the test.

git-svn-id: http://svn.foswiki.org/trunk@15443 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Sep 27, 2012
1 parent 1c3c831 commit 7ce05ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions UnitTestContrib/test/unit/VCStoreTests.pm
Expand Up @@ -385,8 +385,10 @@ sub verify_Inconsistent_implicitSave {
$this->assert_str_equals( $this->{session}->{user}, $info->{author} );
$this->assert_num_equals( 3, $info->{version} );

# Ensure the file timestamp is used for the revision date
$this->assert_num_equals( $date, $info->{date} );
my $dateDiff = abs( $info->{date} - $date );

# Ensure the file timestamp is used for the revision date, allowing a 1-second fuzz factor
$this->assert( ( $dateDiff <= 1 ) );

# Make sure that previous revs exist and have the right content
$readMeta->finish();
Expand Down

0 comments on commit 7ce05ab

Please sign in to comment.