Page MenuHomePhabricator

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

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 20 2018, 2:25 PM
RazeSoldier updated the task description. (Show Details)Sep 20 2018, 2:25 PM
RazeSoldier moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.
RazeSoldier updated the task description. (Show Details)Sep 20 2018, 2:29 PM
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

D3r1ck01 claimed this task.Nov 5 2018, 12:03 PM
D3r1ck01 triaged this task as Normal priority.
D3r1ck01 added a project: User-D3r1ck01.
D3r1ck01 moved this task from Backlog to Doing [WIP] on the User-D3r1ck01 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.
RazeSoldier updated the task description. (Show Details)Nov 5 2018, 5:59 PM
D3r1ck01 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
D3r1ck01 updated the task description. (Show Details)
D3r1ck01 renamed this task from PHPUnit test failed due missing SpecialEditWatchlistTest::tearDown() to Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown().

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

D3r1ck01 removed D3r1ck01 as the assignee of this task.Nov 5 2018, 6:11 PM
D3r1ck01 moved this task from Doing [WIP] to Backlog on the User-D3r1ck01 board.
D3r1ck01 added a subscriber: D3r1ck01.
  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. :)

Daimona added a subscriber: Daimona.Nov 5 2018, 8:00 PM

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 closed this task as Resolved.Nov 8 2018, 2:30 PM
RazeSoldier claimed this task.
RazeSoldier removed RazeSoldier as the assignee of this task.Jan 23 2019, 7:33 PM