Skip to content

Commit 3ab4056

Browse files
committed
Raise per-user client limit in tests that use more than 2 client IDs
Tests for update counting and stale compaction use 4 client IDs from the same user, which now exceeds the DEFAULT_MAX_CLIENTS_PER_USER limit of 2 introduced in the peer limits backport.
1 parent 515e821 commit 3ab4056

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/phpunit/tests/rest-api/rest-sync-server.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,14 @@ public function test_sync_update_data_preserved() {
530530
public function test_sync_total_updates_increments() {
531531
wp_set_current_user( self::$editor_id );
532532

533+
// Raise per-user client limit so 4 clients from one user are allowed.
534+
add_filter(
535+
'real_time_collaboration_max_clients_per_user',
536+
function () {
537+
return 10;
538+
}
539+
);
540+
533541
$room = $this->get_post_room();
534542
$update = array(
535543
'type' => 'update',
@@ -651,6 +659,14 @@ public function test_sync_should_compact_is_false_for_non_compactor() {
651659
public function test_sync_stale_compaction_succeeds_when_newer_compaction_exists() {
652660
wp_set_current_user( self::$editor_id );
653661

662+
// Raise per-user client limit so 4 clients from one user are allowed.
663+
add_filter(
664+
'real_time_collaboration_max_clients_per_user',
665+
function () {
666+
return 10;
667+
}
668+
);
669+
654670
$room = $this->get_post_room();
655671
$update = array(
656672
'type' => 'update',

0 commit comments

Comments
 (0)