[wp-trac] [WordPress Trac] #52607: Investigate why the ms-excluded test group fails when run on its own
WordPress Trac
noreply at wordpress.org
Wed Jun 16 14:16:13 UTC 2021
#52607: Investigate why the ms-excluded test group fails when run on its own
------------------------------+------------------------
Reporter: johnbillion | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.8
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: multisite
------------------------------+------------------------
Changes (by hellofromTonya):
* keywords: needs-unit-tests has-patch commit => has-patch commit
Comment:
Tested => resolves the reported issue.
== Testing results
Removing the committed lines from [50433], tests fail:
{{{
npm run test:php -- --group ms-excluded
> WordPress at 5.8.0 test:php ../wordpress-develop
> node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit "--
group" "ms-excluded"
Creating wordpress-develop_phpunit_run ... done
Installing...
Running as single site... To run multisite, use -c
tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-
http.
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
.........F....................... 33 / 33
(100%)
Time: 6.51 seconds, Memory: 128.00 MB
There was 1 failure:
1)
Tests_AdminBar::test_admin_bar_contains_correct_links_for_users_with_role
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'http://example.org/wp-admin/'
+'http://example.org/'
/var/www/tests/phpunit/tests/adminbar.php:128
FAILURES!
Tests: 33, Assertions: 201, Failures: 1.
}}}
After reapplying the committed changes, tests all pass:
{{{
npm run test:php -- --group ms-excluded
> WordPress at 5.8.0 test:php ../wordpress-develop
> node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit "--
group" "ms-excluded"
Creating wordpress-develop_phpunit_run ... done
Installing...
Running as single site... To run multisite, use -c
tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-
http.
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
................................. 33 / 33
(100%)
Time: 6.03 seconds, Memory: 128.00 MB
OK (33 tests, 204 assertions)
}}}
=== Test 2: Running full test suite
Repeated the above tests without the `--group`, i.e. running the full test
suite.
Results: As expected, tests pass before and after (as the problem is
isolated to a group).
Before the committed changeset:
{{{
Time: 2.67 minutes, Memory: 171.05 MB
OK, but incomplete, skipped, or risky tests!
Tests: 12420, Assertions: 57530, Skipped: 20.
}}}
After the committed changeset: Passed
{{{
Time: 2.65 minutes, Memory: 171.05 MB
OK, but incomplete, skipped, or risky tests!
Tests: 12420, Assertions: 57530, Skipped: 20.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52607#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list