Overview

I think this is only on mariadb, there's two random failures:

Drupal\Tests\canvas\Kernel\Entity\JavascriptComponentAccessTest::testAccess
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 [
     'canvas_page' => Array &1 [
-        1 => '1',
         2 => '1',
         3 => '1',
+        1 => '1',
     ],
 ]

/builds/project/canvas/tests/src/Kernel/Entity/JavascriptComponentAccessTest.php:146

Drupal\Tests\canvas\Functional\ApiUiContentTemplateControllersTest::testSuggestPreviewContentEntities
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 [
-    3 => Array &1 [
+    6 => Array &1 [
+        'id' => '6',
+        'label' => 'Entity LAST',
+    ],
+    3 => Array &2 [
         'id' => '3',
         'label' => 'Updated article',
-    ],
-    6 => Array &2 [
-        'id' => '6',
-        'label' => 'Entity LAST',
     ],
     1 => Array &3 [
         'id' => '1',

/builds/project/canvas/tests/src/Functional/ApiUiContentTemplateControllersTest.php:817

Proposed resolution

User interface changes

Issue fork canvas-3562563

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Title: Random failures in some phpunit tests in mariadb » Ensure timestamps are predictable to avoid flaky phpunit tests
Status: Active » Needs review

This actually has little to do with db engines as far as I see.

They pass reliable on all of them when the timestamps are explicit.

penyaskito’s picture

Assigned: Unassigned » penyaskito
Status: Needs review » Reviewed & tested by the community

This is passing consistently for me on mariadb, and also on CI.

Locally I tried with something like:

seq 5 | xargs -Iz ddev xb-phpunit tests/src/Functional/ApiUiContentTemplateControllersTest.php --filter testSuggestPreviewContentEntities

  • penyaskito committed 8229c356 on 1.x
    fix(Tests): #3562563 Ensure timestamps are predictable to avoid flaky...
penyaskito’s picture

Assigned: penyaskito » Unassigned
Status: Reviewed & tested by the community » Fixed

Merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.