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
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:
- 3513618-random-test-failure
changes, plain diff MR !11516
Comments
Comment #3
mstrelan commentedComment #4
mondrakeAsked a question, inline.
Comment #5
smustgrave commentedIs the only remaining task to determine if a trait should be used?
Comment #6
mstrelan commentedYep and I think we should leave it for now until we find a need for it.
Comment #7
smustgrave commentedOk in that case believe this one could be good to go?
Comment #8
mondrakeI may have missed completely how this work, but I am not sure we are really doing what we should. See question inline.
Comment #9
smustgrave commentedComment #10
mstrelan commentedAdded explanation inline. It can check up to 10 times within the 100ms timeout, but that assumes it takes no time at all to check.
Comment #11
mondrakeComment #12
mstrelan commentedMoved the query inside the wait callback.
Comment #13
smustgrave commentedBelieve feedback has been addressed
Comment #14
mstrelan commentedComment #17
catchCommitted/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.