Opened 9 years ago
Last modified 8 years ago
#41425 new enhancement
Killing phpunit may result in a broken database
| Reported by: | bobbingwide | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Build/Test Tools | Version: | 4.9 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
While running phpunit for wordpress-develop under Windows I hit ctrl-break during the Install processing.
The next time I ran phpunit it didn't work.
Actual output
"Error establishing a database connection"
<p>One or more database tables are unavailable. The database may need to be <a href="maint/repair.php?referrer=is_blog_installed">repaired</a>.</p></body>
Expected output
The install routine should drop and recreate the tables during Install
Explanation
The process was killed after the wp_options table was dropped but before wp_install() had completed.
Workaround
Either change $table_prefix in wp-tests-config.php or drop all the other tables that are missing and re-run.
Attachments (1)
Change History (5)
#2
follow-up:
↓ 3
@
9 years ago
I've experienced this...but can't reproduce it right now. Thus, I'm not sure at what point killing phpunit causes the problem.
The reasons I kill phpunit is when I realize I've started it with the wrong --group arg or I realize that one of the tests that I'm writing is wrong and don't want to wait for the incorrect tests to finish.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Something similar can also happen if the tests are being run as multisite and they exit in the middle of a test involving creating additional sites on the network. (Or something like that, I don't remember the exact circumstance.)