Page MenuHomePhabricator

wfResetOutputBuffers() breaks unit tests
Closed, ResolvedPublic

Description

If something being unit tested calls wfResetOutputBuffers(), it will remove the output handler that PHPUnit uses to catch output to detect tests producing output when they shouldn't be.

In the old version of PHPUnit used by Jenkins, this manifests as a warning "ob_end_clean(): failed to delete buffer. No buffer to delete" causing the test to fail. In more modern versions of PHPUnit, the missing buffer is detected and the test is instead marked as "risky".

Of course, it breaking depends on wfResetOutputBuffers actually working in the first place (see T109842 and HHVM bug 4868).

Event Timeline

Anomie created this task.Aug 21 2015, 4:25 PM
Anomie updated the task description. (Show Details)
Anomie raised the priority of this task from to Needs Triage.
Anomie claimed this task.
Anomie added a project: MediaWiki-Core-Testing.
Anomie added a subscriber: Anomie.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2015, 4:25 PM

Change 232951 had a related patch set uploaded (by Anomie):
Fix so wfResetOutputBuffers doesn't break unit tests

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

Change 232951 merged by jenkins-bot:
Fix so wfResetOutputBuffers doesn't break unit tests

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

Anomie closed this task as Resolved.Sep 10 2015, 2:27 PM