Skip to content

Commit 0c60ce5

Browse files
committed
Combine wp eval calls in split-dump scenario
1 parent 65f6886 commit 0c60ce5

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

features/export.feature

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,8 @@ Feature: Export content.
807807

808808
Scenario: Export without splitting the dump
809809
Given a WP install
810-
# Make export file > 15MB so will split by default. Need to split into 4 * 4MB to stay below 10% of default redo log size of 48MB, otherwise get MySQL error. Use `wp eval` + `str_repeat` because SQLite has no REPEAT() function.
811-
And I run `wp eval "update_post_meta(1, '_dummy_0', str_repeat('A', 4 * 1024 * 1024));"`
812-
And I run `wp eval "update_post_meta(1, '_dummy_1', str_repeat('A', 4 * 1024 * 1024));"`
813-
And I run `wp eval "update_post_meta(1, '_dummy_2', str_repeat('A', 4 * 1024 * 1024));"`
814-
And I run `wp eval "update_post_meta(1, '_dummy_3', str_repeat('A', 4 * 1024 * 1024));"`
810+
# Make export file > 15MB so will split by default. Need to split into 4 * 4MB to stay below 10% of default redo log size of 48MB, otherwise get MySQL error. Use `wp eval` + `str_repeat` because SQLite has no REPEAT() function. All four rows go through a single `wp eval` to avoid four WordPress bootstraps.
811+
And I run `wp eval "update_post_meta(1, '_dummy_0', str_repeat('A', 4 * 1024 * 1024)); update_post_meta(1, '_dummy_1', str_repeat('A', 4 * 1024 * 1024)); update_post_meta(1, '_dummy_2', str_repeat('A', 4 * 1024 * 1024)); update_post_meta(1, '_dummy_3', str_repeat('A', 4 * 1024 * 1024));"`
815812

816813
When I run `wp export`
817814
Then STDOUT should contain:

0 commit comments

Comments
 (0)