You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2010/08/20 15:51:13 UTC

svn commit: r987508 - /httpd/test/framework/trunk/t/modules/dav.t

Author: rjung
Date: Fri Aug 20 13:51:13 2010
New Revision: 987508

URL: http://svn.apache.org/viewvc?rev=987508&view=rev
Log:
Bug fixed by r987484 wasn't reliably detected here,
bfore "now" was equal to both tested time properties.

So let's wait until both properties are no
longer equal to now before checking them.

Modified:
    httpd/test/framework/trunk/t/modules/dav.t

Modified: httpd/test/framework/trunk/t/modules/dav.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/dav.t?rev=987508&r1=987507&r2=987508&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/dav.t (original)
+++ httpd/test/framework/trunk/t/modules/dav.t Fri Aug 20 13:51:13 2010
@@ -4,12 +4,13 @@ use warnings FATAL => 'all';
 use Apache::Test;
 use Apache::TestRequest;
 use Apache::TestUtil;
+use HTTP::Date;
 
 ##
 ## mod_dav tests
 ##
 
-plan tests => 14, [qw(dav HTTP::DAV)];
+plan tests => 15, [qw(dav HTTP::DAV)];
 require HTTP::DAV;
 
 my $vars = Apache::Test::vars();
@@ -51,14 +52,20 @@ print "DAV put test:\n";
 ok $response->is_success;
 
 ## get properties ##
+## Wait until none of the returned time
+## properties equals "now"
+sleep(1);
 $response = $resource->propfind;
 print "getting DAV resource properties:\n";
 ok $response->is_success;
 
 my $createdate = $resource->get_property( "creationdate" );
 my $lastmodified = $resource->get_property( "getlastmodified" );
+my $now = HTTP::Date::time2str(time());
 print "created:     $createdate\n";
 print "modified:    $lastmodified\n";
+print "now:         $now\n";
+ok $createdate ne $now;
 ok $createdate eq $lastmodified;
 
 ## should be locked ##