From c5551258fedf8c1989708da9331c088d66a0d99c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Jun 2026 04:45:32 +1200 Subject: [PATCH] test(messaging): run fan-out coroutine tests only without native Swoole Tests/Unit runs in the Appwrite container (PHP 8.5) with the native Swoole extension, where these tests' real Co\run()/batch() scheduler runs in-process and destabilises later coroutine-sensitive tests in the shared unit suite (the run aborted mid-suite at ~126/644 inside the Network/Fetcher tests). Skip them under native Swoole; they still run locally via the Fiber polyfill, and the real worker path is covered by the e2e Messaging suite. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/unit/Messaging/MessagingFanoutTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit/Messaging/MessagingFanoutTest.php b/tests/unit/Messaging/MessagingFanoutTest.php index ec6dbe87f4..b42733c615 100644 --- a/tests/unit/Messaging/MessagingFanoutTest.php +++ b/tests/unit/Messaging/MessagingFanoutTest.php @@ -363,6 +363,18 @@ class MessagingFanoutTest extends TestCase { private const RECIPIENT_COUNT = 4500; + protected function setUp(): void + { + // These tests drive the worker through real Swoole coroutines (Co\run/batch). Under the native + // extension that scheduler runs in-process and destabilises later tests in the shared unit suite + // (the run aborts mid-suite inside unrelated coroutine-sensitive tests). They run locally against + // the Fiber polyfill in SwooleCoroutinePolyfill.php; the real worker path is exercised on CI by the + // e2e Messaging suite. See PR #12465. + if (\extension_loaded('swoole')) { + $this->markTestSkipped('Fan-out coroutine tests run only without the native Swoole extension; the worker path is covered on CI by the e2e Messaging suite.'); + } + } + private function provider(): Document { return new Document([