Make WordPress Core

Opened 8 years ago

Last modified 3 years ago

#34185 new defect (bug)

Excluding certain PHPUnit test groups results in "Database is dead" notice and tests terminate

Reported by: netweb's profile netweb Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: needs-patch
Focuses: Cc:

Description

When excluding certain PHPUnit groups from the full test suite the tests fail with a "Database is dead" notice.

Known groups thus far:

  • phpunit --exclude-group import
  • phpunit --exclude-group query
$ phpunit --exclude-group import
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

.............................................................   61 / 4556 (  1%)
...................................SS........................  122 / 4556 (  2%)
.............................................................  183 / 4556 (  4%)
.............................................................  244 / 4556 (  5%)
.S...........................................................  305 / 4556 (  6%)
.............................................................  366 / 4556 (  8%)
.............................................................  427 / 4556 (  9%)
.............................................................  488 / 4556 ( 10%)
.............................................................  549 / 4556 ( 12%)
.............................................................  610 / 4556 ( 13%)
.....................S....S..................................  671 / 4556 ( 14%)
................................................S............  732 / 4556 ( 16%)
.............................................................  793 / 4556 ( 17%)
..................................Database is dead.

Change History (3)

#1 @netweb
8 years ago

Adding another known case: phpunit --exclude-group xmlrpc

#2 @isabel_brison
3 years ago

I tested this using the test:php npm script, and found that the tests abort no matter what group I name after --exclude-group. Output is:

...........................................................    59 / 12551 (  0%)
...........................................................   118 / 12551 (  0%)
...............................EE..........................   177 / 12551 (  1%)
........................................EE...............E.   236 / 12551 (  1%)
.......FF.F.E.EE.FEFFFF....................................   295 / 12551 (  2%)
FEFF.FFFFF.EFEF.EFFFF.FFFF.FFF...EEEFEEEEEEEEEEEEEEEEEEEE.E   354 / 12551 (  2%)
EEFEEEEEEEEEEEEEEEEEEEE..FFFFFFS..FFFFF.FFFFF............-1% 

Specifying a --group works as expected.

Something else I noticed is that when passing --exclude-group, groups that are excluded by default, such as external-http, are no longer excluded. Not sure if that's related as those groups work fine when run individually.

#3 @johnbillion
3 years ago

I also saw this while working on #52645 and I'm pretty sure it's coming from a test in the ajax group.

Note: See TracTickets for help on using tickets.