Problem/Motivation

Drupal\Tests\mysql\Kernel\mysql\ConnectionUnitTest::testOpenSelectQueryClose
Failed asserting that an array does not have the key 907.

core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php:98
core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php:178

Steps to reproduce

Proposed resolution

Instead of waiting 20ms for the connection to close, introduce a waitFor function that will test every 10ms if the connection is closed, timing out after 100ms.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3513618

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

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
mondrake’s picture

Asked a question, inline.

smustgrave’s picture

Is the only remaining task to determine if a trait should be used?

mstrelan’s picture

Yep and I think we should leave it for now until we find a need for it.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Ok in that case believe this one could be good to go?

mondrake’s picture

I may have missed completely how this work, but I am not sure we are really doing what we should. See question inline.

smustgrave’s picture

Status: Reviewed & tested by the community » Needs review
mstrelan’s picture

Added explanation inline. It can check up to 10 times within the 100ms timeout, but that assumes it takes no time at all to check.

mondrake’s picture

Status: Needs review » Needs work
mstrelan’s picture

Status: Needs work » Needs review

Moved the query inside the wait callback.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe feedback has been addressed

  • catch committed fb24b240 on 11.x
    Issue #3513618 by mstrelan, mondrake: [random test failure]...

  • catch committed 0f068a5d on 10.5.x
    Issue #3513618 by mstrelan, mondrake: [random test failure]...
catch’s picture

Version: 11.x-dev » 10.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks! I think it's fine if we move the wait for method up if/when we find another good use case for it.

Status: Fixed » Closed (fixed)

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