Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Package: use Full_Sync_Immediately by default #14357

Merged
merged 2 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/sync/src/class-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Modules {
'Automattic\\Jetpack\\Sync\\Modules\\Meta',
'Automattic\\Jetpack\\Sync\\Modules\\Plugins',
'Automattic\\Jetpack\\Sync\\Modules\\Stats',
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync',
'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately',
'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships',
);

Expand Down
10 changes: 5 additions & 5 deletions tests/php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ function _manually_install_woocommerce() {
*
* @return array
*/
function jetpack_full_sync_immediately_on( $modules ) {
function jetpack_full_sync_immediately_off( $modules ) {
foreach ( $modules as $key => $module ) {
if ( in_array( $module, array( 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync', 'Jetpack_Sync_Modules_Full_Sync' ), true ) ) {
$modules[ $key ] = 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately';
if ( in_array( $module, array( 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' ), true ) ) {
$modules[ $key ] = 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync';
}
}
return $modules;
}

if ( false !== getenv( 'SYNC_BETA' ) ) {
tests_add_filter( 'jetpack_sync_modules', 'jetpack_full_sync_immediately_on' );
if ( false === getenv( 'SYNC_BETA' ) ) {
tests_add_filter( 'jetpack_sync_modules', 'jetpack_full_sync_immediately_off' );
}

require $test_root . '/includes/bootstrap.php';
Expand Down