diff --git a/includes/EventManager.php b/includes/EventManager.php index e10e4b2..7708cb0 100644 --- a/includes/EventManager.php +++ b/includes/EventManager.php @@ -251,7 +251,7 @@ public function send_saved_events_batch(): void { * * @var array $events */ - $events = $queue->pull( 100 ); + $events = $queue->pull( 50 ); // If queue is empty, do nothing. if ( empty( $events ) ) { diff --git a/tests/phpunit/includes/EventManagerTest.php b/tests/phpunit/includes/EventManagerTest.php index 5e277c3..2fcfcb0 100644 --- a/tests/phpunit/includes/EventManagerTest.php +++ b/tests/phpunit/includes/EventManagerTest.php @@ -228,7 +228,7 @@ function () use ( $batch_queue_mock ) { public function test_send_saved_events_happy_path_no_failed_events(): void { $this->markTestSkipped( 'Due to an unidentified bug causing events to be resent, we are temporarily disabling retries.' ); - + $batch_queue_mock = Mockery::mock( BatchQueue::class ); \Patchwork\redefine( @@ -317,7 +317,7 @@ function () use ( $batch_queue_mock ) { $batch_queue_mock->expects( 'pull' ) ->once() - ->with( 100 ) + ->with( 50 ) ->andReturn( array( 15 => $event, @@ -386,7 +386,7 @@ function () use ( $batch_queue_mock ) { $batch_queue_mock->expects( 'pull' ) ->once() - ->with( 100 ) + ->with( 50 ) ->andReturn( array( 15 => $event, @@ -449,7 +449,7 @@ function () use ( $batch_queue_mock ) { $batch_queue_mock->expects( 'pull' ) ->once() - ->with( 100 ) + ->with( 50 ) ->andReturn( array( 16 => $event, @@ -721,7 +721,7 @@ function () use ( $batch_queue_mock ) { $batch_queue_mock->expects( 'pull' ) ->once() - ->with( 100 ) + ->with( 50 ) ->andReturn( array( 15 => $event,