diff --git a/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php b/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php
index 8a2cb91..2013ca9 100644
--- a/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php
+++ b/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php
@@ -37,7 +37,14 @@ public static function getInfo() {
   public function testBulkForm() {
     $nodes = array();
     for ($i = 0; $i < 10; $i++) {
-      $nodes[] = $this->drupalCreateNode(array('sticky' => FALSE));
+      // Ensure nodes are sorted in the same order they are inserted in the
+      // array.
+      $timestamp = REQUEST_TIME - $i;
+      $nodes[] = $this->drupalCreateNode(array(
+        'sticky' => FALSE,
+        'created' => $timestamp,
+        'changed' => $timestamp,
+      ));
     }
 
     $this->drupalGet('test_bulk_form');
@@ -72,6 +79,10 @@ public function testBulkForm() {
     $this->assertText('Unpublish content was applied to 1 item.');
 
     // Load the node again.
+    foreach ($nodes as $index => $n) {
+      $n = node_load($n->id(), TRUE);
+      $this->assertTrue(FALSE, "$index: {$n->id()} - {$n->status}");
+    }
     $node = node_load($node->id(), TRUE);
     $this->assertFalse($node->status, 'A single node has been unpublished.');
 
