Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.91
diff -u -p -r1.91 comment.test
--- modules/comment/comment.test	6 Nov 2010 11:15:10 -0000	1.91
+++ modules/comment/comment.test	8 Nov 2010 12:09:09 -0000
@@ -414,6 +414,11 @@ class CommentInterfaceTest extends Comme
     $this->assertEqual($node->last_comment_uid, $this->web_user->uid, t('The initial value of node last_comment_uid is the node uid.'));
     $this->assertEqual($node->comment_count, 0, t('The initial value of node comment_count is zero.'));
 
+    // As we will compare timestamps with 1s granularity, we must ensure
+    // that they actually differ in order to avoid non-deterministic
+    // false-positives.
+    sleep(1);
+
     // Post comment #1 as web_user2.
     $this->drupalLogin($this->web_user2);
     $comment_text = $this->randomName();
@@ -423,7 +428,7 @@ class CommentInterfaceTest extends Comme
     // Checks the new values of node comment statistics with comment #1.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->created, t('The value of node last_comment_timestamp is the comment #1 created date.'));
+    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->changed, t('The value of node last_comment_timestamp is the comment #1 changed date.'));
     $this->assertEqual($node->last_comment_name, NULL, t('The value of node last_comment_name is NULL.'));
     $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, t('The value of node last_comment_uid is the comment #1 uid.'));
     $this->assertEqual($node->comment_count, 1, t('The value of node comment_count is 1.'));
@@ -440,6 +445,11 @@ class CommentInterfaceTest extends Comme
     $this->setCommentAnonymous('1');
     $this->drupalLogout();
 
+    // As we will compare timestamps with 1s granularity, we must ensure
+    // that they actually differ in order to avoid non-deterministic
+    // false-positives.
+    sleep(1);
+
     // Post comment #2 as anonymous (comment approval enabled).
     $this->drupalGet('comment/reply/' . $this->node->nid);
     $anonymous_comment = $this->postComment($this->node, $this->randomName(), '', TRUE);
@@ -449,7 +459,7 @@ class CommentInterfaceTest extends Comme
     // ensure they haven't changed since the comment has not been moderated.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->created, t('The value of node last_comment_timestamp is still the comment #1 created date.'));
+    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->changed, t('The value of node last_comment_timestamp is still the comment #1 changed date.'));
     $this->assertEqual($node->last_comment_name, NULL, t('The value of node last_comment_name is still NULL.'));
     $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, t('The value of node last_comment_uid is still the comment #1 uid.'));
     $this->assertEqual($node->comment_count, 1, t('The value of node comment_count is still 1.'));
@@ -463,6 +473,11 @@ class CommentInterfaceTest extends Comme
     ));
     $this->drupalLogout();
 
+    // As we will compare timestamps with 1s granularity, we must ensure
+    // that they actually differ in order to avoid non-deterministic
+    // false-positives.
+    sleep(1);
+
     // Post comment #3 as anonymous.
     $this->drupalGet('comment/reply/' . $this->node->nid);
     $anonymous_comment = $this->postComment($this->node, $this->randomName(), '', array('name' => $this->randomName()));
@@ -471,7 +486,7 @@ class CommentInterfaceTest extends Comme
     // Checks the new values of node comment statistics with comment #3.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->created, t('The value of node last_comment_timestamp is the comment #3 created date.'));
+    $this->assertEqual($node->last_comment_timestamp, $comment_loaded->changed, t('The value of node last_comment_timestamp is the comment #3 changed date.'));
     $this->assertEqual($node->last_comment_name, $comment_loaded->name, t('The value of node last_comment_name is the name of the anonymous user.'));
     $this->assertEqual($node->last_comment_uid, 0, t('The value of node last_comment_uid is zero.'));
     $this->assertEqual($node->comment_count, 2, t('The value of node comment_count is 2.'));
