Page MenuHomePhabricator

Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown()
Closed, ResolvedPublicBUG REPORT

Description

Environments:

MW1.32.0-alpha (27cb4c5)
PHP7.2.9

Steps to Reproduce:

$ php tests/phpunit/phpunit.php

Actual Results:

...
ERRORS!
Tests: 21310, Assertions: 132825, Errors: 1076, Failures: 47, Warnings: 1, Skipped: 62, Risky: 1.
PHP Fatal error:  Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown() in /mediawiki/tests/phpunit/MediaWikiTestCase.php:143
Stack trace:
#0 [internal function]: MediaWikiTestCase->__destruct()
#1 {main}
  thrown in /mediawiki/tests/phpunit/MediaWikiTestCase.php on line 143
PHP Stack trace:
PHP   1. MWExceptionHandler::{closure:/mediawiki/includes/exception/MWExceptionHandler.php:126-128}() /mediawiki/includes/exception/MWExceptionHandler.php:0

Expected Code:
SpecialWatchlistTest class must have tearDown() method.

Event Timeline

RazeSoldier renamed this task from Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown() to PHPUnit test failed due missing SpecialWatchlistTest::tearDown().Sep 20 2018, 2:35 PM

Change 471701 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/core@master] Add SpecialWatchlistTest::tearDown() method

https://gerrit.wikimedia.org/r/471701

xSavitar triaged this task as Medium priority.
xSavitar added a project: User-xSavitar.
xSavitar moved this task from Backlog to Doing [WIP] on the User-xSavitar board.

Change 471709 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/core@REL1_32] Add SpecialWatchlistTest::tearDown() method

https://gerrit.wikimedia.org/r/471709

Change 471710 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/core@REL1_31] Add SpecialWatchlistTest::tearDown() method

https://gerrit.wikimedia.org/r/471710

Patch up and also back-ported to REL1_32 and REL1_31 (just in case).

I noticed the discussion in the patch. I want to report:

  1. This task title looks wrong, may be Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown() would be best, because the exception actually no interrupt test and just show text in the test report end.
  2. I can't reproduce this problem at the current HEAD commit (6ac8c49). But when I checkout to 27cb4c5, I can reproduce.
xSavitar renamed this task from PHPUnit test failed due missing SpecialWatchlistTest::tearDown() to PHPUnit test failed due missing SpecialEditWatchlistTest::tearDown().Nov 5 2018, 6:03 PM
xSavitar renamed this task from PHPUnit test failed due missing SpecialEditWatchlistTest::tearDown() to Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown().
xSavitar updated the task description. (Show Details)

Change 471701 abandoned by D3r1ck01:
Add SpecialWatchlistTest::tearDown() method

Reason:
I'll resurrect this patch when I have a better understanding of the issue (if no one has submitted a fix yet).

https://gerrit.wikimedia.org/r/471701

Change 471701 restored by D3r1ck01:
Add SpecialWatchlistTest::tearDown() method

https://gerrit.wikimedia.org/r/471701

Change 471701 abandoned by D3r1ck01:
Add SpecialEditWatchlistTest::tearDown() method

https://gerrit.wikimedia.org/r/471701

Change 471709 abandoned by D3r1ck01:
Add SpecialWatchlistTest::tearDown() method

Reason:
Needs fix on master first.

https://gerrit.wikimedia.org/r/471709

Change 471710 abandoned by D3r1ck01:
Add SpecialWatchlistTest::tearDown() method

Reason:
Needs fix on master first.

https://gerrit.wikimedia.org/r/471710

xSavitar moved this task from Doing [WIP] to Backlog on the User-xSavitar board.
xSavitar subscribed.
  1. I can't reproduce this problem at the current HEAD commit (6ac8c49). But when I checkout to 27cb4c5, I can reproduce.

27cb4c5 matches 1.32.0-alpha so it seems this issue happens from 1.32 and below? Will double check before attempting again. :)

Just a note: this failure is often seen when something abruptly halts the script. It could be due to something happening elsewhere.

For my test (run P7769), I find 0c4b5ca fix this problem.

So in that case, I guess maybe that change (0c4b5ca) should be back-ported to REL1_32 if necessary and other versions too?

9fbbce85 already include in REL1_32. I don't know why this will fix the problem. But the problem has actually been solved, so we should mark this task as resolved.

Also REL1_31 without this problem.

RazeSoldier claimed this task.