Make WordPress Core

Opened 3 years ago

Last modified 15 months ago

#53861 new defect (bug)

Promote a database error during test bootstrap to a failure

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

Follow-up to #53830

When a database error occurs during the test suite bootstrap it should cause the test run to fail by exiting with an exit code of 1.

This problem is actually detected during the test run but it doesn't cause the run to fail.

If this had been in place before [50129] then the problem would have been identified.

Change History (5)

#1 follow-up: @jrf
2 years ago

Just came across this ticket, sounds useful. Unfortunately the GitHub Action logs are no longer available (retention is only six months), so it is unclear what the error was which was encountered and how PHPUnit handled it in that situation.

Based on a quick test I did, throwing an Exception in the bootstrap will halt test execution and exit with a non-0 exit code, so that could be the way forward.

#2 in reply to: ↑ 1 @SergeyBiryukov
2 years ago

Replying to jrf:

Unfortunately the GitHub Action logs are no longer available (retention is only six months), so it is unclear what the error was which was encountered and how PHPUnit handled it in that situation.

Based on the comments from the linked ticket #53830, I think this was the error:

WordPress database error: [Table 'local.wp_options' doesn't exist]

It was displayed during the test run but didn't cause the affected tests to fail.

This ticket was mentioned in PR #4847 on WordPress/wordpress-develop by @spacedmonkey.


15 months ago
#3

  • Keywords has-patch has-unit-tests added; needs-patch removed

#4 @spacedmonkey
15 months ago

Created a PR for this https://github.com/WordPress/wordpress-develop/pull/4847.

Can you take a look at @johnbillion @desrosj

@johnbillion commented on PR #4847:


15 months ago
#5

Looks like this is causing all the tests to fail

Note: See TracTickets for help on using tickets.