Problem/Motivation

Looks like ConnectionUnitTest doesn't actually get skipped because of a very small logic snafu:

https://git.drupalcode.org/project/drupal/-/blob/7.73/modules/simpletest...

    $this->skipTest = (bool) $connection_info['default']['driver'] != 'mysql';

Steps to reproduce

php > var_dump((bool) 'sqlite' != 'mysql');

bool(false)

php > var_dump((bool) ('sqlite' != 'mysql'));

bool(true)

Proposed resolution

Fix the logic so that the test is skipped for non-MySQL drivers.

Remaining tasks

Follow up if we want to fix PostgreSQL tests too at some point - backport of: #3128880: Make ConnectionUnitTest also run for PostgreSQL

...for now though, I'd expect this patch to fix (by skipping) a test which will fail in PostgreSQL.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

n/a

CommentFileSizeAuthor
#2 3174134-2.patch1.02 KBmcdruid
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcdruid created an issue. See original summary.

mcdruid’s picture

Status: Active » Needs review
FileSize
1.02 KB

n.b. not much point testing this with SQLite in isolation until a couple of the key patches in the parent issue have been committed.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Pending Drupal 7 commit

RTMB - Approved - thanks!

  • mcdruid committed f8659f5 on 7.x
    Issue #3174134 by mcdruid, Fabianx: Fix skipping of ConnectionUnitTest...
mcdruid’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Pending Drupal 7 commit

Thank you!

Status: Fixed » Closed (fixed)

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