Make WordPress Core

Opened 22 months ago

Last modified 9 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: needs-patch
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 (2)

#1 follow-up: @jrf
9 months 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
9 months 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.

Note: See TracTickets for help on using tickets.