diff --git a/tests/feeds_processor_node.test b/tests/feeds_processor_node.test
index c58611ab11b6cd72cde86336dbed718c78fbffe6..7f999f9c01477931ef85d819edee64be573ea183 100644
--- a/tests/feeds_processor_node.test
+++ b/tests/feeds_processor_node.test
@@ -173,7 +173,16 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
 
     // Set to update existing, remove authorship of above nodes and import again.
     $this->setSettings('syndication', 'FeedsNodeProcessor', array('update_existing' => 2));
-    db_query("UPDATE {node} n JOIN {feeds_item} fi ON fi.entity_type = 'node' AND n.nid = fi.entity_id SET n.uid = 0, fi.hash=''");
+    $nids = db_query("SELECT nid FROM {node} n INNER JOIN {feeds_item} fi ON fi.entity_type = 'node' AND n.nid = fi.entity_id")->fetchCol();
+    db_update('node')
+      ->fields(array('uid' => 0))
+      ->condition('nid', $nids, 'IN')
+      ->execute();
+    db_update('feeds_item')
+      ->fields(array('hash' => ''))
+      ->condition('entity_type', 'node')
+      ->condition('entity_id', $nids, 'IN')
+      ->execute();
     $this->drupalPost("node/$nid/import", array(), 'Import');
     $this->drupalGet('node');
     $this->assertNoPattern('/<span class="username">' . check_plain($this->auth_user->name) . '<\/span>/');
@@ -396,10 +405,10 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
     // There should not be feed links on an article node.
     $non_feed_node = $this->drupalCreateNode(array('type' => 'article'));
     $this->drupalGet('node/' . $non_feed_node->nid);
-    $this->assertNoLink('Import');
+    $this->assertNoLinkByHref('node/' . $non_feed_node->nid . '/import');
     $this->assertNoLink('Delete items');
 
-    // Navigat to a non-feed node form, there should be no Feed field visible.
+    // Navigate to a non-feed node form, there should be no Feed field visible.
     $this->drupalGet('node/add/article');
     $this->assertNoFieldByName('feeds[FeedsHTTPFetcher][source]');
   }