WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#34438 closed defect (bug) (invalid)

Tests_oEmbed_HTTP_Headers tests are failing

Reported by: tyxla Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords:
Focuses: Cc:

Description

The tests in Tests_oEmbed_HTTP_Headers are failing, because WP_UnitTestCase is not found.

Reason: the @runTestsInSeparateProcesses annotation, which was introduced in [34903] (related ticket: #32522). We should move this annotation to the methods, as it was done in [35211].

Attachments (1)

34438.patch (1.0 KB) - added by tyxla 3 years ago.
Moving the @runTestsInSeparateProcesses and @preserveGlobalState annotations to the methods in Tests_oEmbed_HTTP_Headers.

Download all attachments as: .zip

Change History (9)

@tyxla
3 years ago

Moving the @runTestsInSeparateProcesses and @preserveGlobalState annotations to the methods in Tests_oEmbed_HTTP_Headers.

#1 @tyxla
3 years ago

  • Keywords has-patch added

#2 follow-up: @swissspidy
3 years ago

Out of curiosity, how are you running the tests? On my local checkout everything passes, as do the travis builds.

It's worth noting that #34207 adds some changes to the headers tests.

#3 in reply to: ↑ 2 @tyxla
3 years ago

Replying to swissspidy:

Out of curiosity, how are you running the tests? On my local checkout everything passes, as do the travis builds.

It's worth noting that #34207 adds some changes to the headers tests.

The tests are failing on Windows 10, PHP 5.6.8, PHPunit 3.7.21 with the latest trunk.

#4 @pento
3 years ago

  • Keywords reporter-feedback added

This patch will cause the tests to not be run in a separate process - when changing to a per-test header, you need to use @runInSeparateProcess, instead of @runTestsInSeparateProcesses.

Could I get you to test again with this change?

#5 follow-up: @tyxla
3 years ago

  • Keywords reporter-feedback removed

@pento Unfortunately, with @runInSeparateProcess on each method the tests are still failing for the same reason. I'm starting to believe that this is a bug on PHPUnit 3.7.21 (the version I'm testing with) on Windows. I've also confirmed that the issue occurs on Windows 8.1 as well (with the same PHPUnit version again). Do you have any other thoughts or ideas, or perhaps updating to a newer PHPUnit seems to be the only option here?

#6 in reply to: ↑ 5 @swissspidy
3 years ago

Replying to tyxla:

Do you have any other thoughts or ideas, or perhaps updating to a newer PHPUnit seems to be the only option here?

Considering that version 5.0 is the current stable release of PHPUnit 5.0 and Travis uses PHPUnit 4.5 or higher (except for PHPUnit 3.6 for PHP 5.2 builds), updating seems like a good idea.

#7 @tyxla
3 years ago

  • Keywords has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

Yep, updating PHPUnit has resolved the issue. Thanks guys.

#8 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.