From f3d052341f0be8cd9057dbbb97102c7bb2f51b51 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 19 May 2026 17:45:02 +0800 Subject: [PATCH 1/2] Run Tests Sequentially --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c25d543..01872ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,7 @@ jobs: # Defines the WordPress and PHP Versions matrix to run tests on. strategy: fail-fast: false + max-parallel: 1 matrix: wp-versions: [ 'latest' ] #[ '6.1.1', 'latest' ] php-versions: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] #[ '7.4', '8.0', '8.1', '8.2' ] From 0a95950fee84f3eea6bec77f52df634529a1e694 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 19 May 2026 19:28:03 +0800 Subject: [PATCH 2/2] Fix Unsubscribe Tests --- tests/Integration/APITest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Integration/APITest.php b/tests/Integration/APITest.php index 0ad858e..1620130 100644 --- a/tests/Integration/APITest.php +++ b/tests/Integration/APITest.php @@ -4245,15 +4245,15 @@ public function testUpdateSubscriberWithInvalidSubscriberID() */ public function testUnsubscribeByEmail() { - // Avoid a rate limit due to previous tests. - sleep(2); - // Add a subscriber. $emailAddress = $this->generateEmailAddress(); $result = $this->api->create_subscriber($emailAddress); $this->assertNotInstanceOf(\WP_Error::class, $result); $this->assertIsArray($result); + // Wait a moment to ensure subscriber is created. + sleep(3); + // Unsubscribe. $this->assertNull($this->api->unsubscribe_by_email($emailAddress)); } @@ -4301,6 +4301,9 @@ public function testUnsubscribe() $this->assertNotInstanceOf(\WP_Error::class, $result); $this->assertIsArray($result); + // Wait a moment to ensure subscriber is created. + sleep(3); + // Unsubscribe. $this->assertNull($this->api->unsubscribe($result['subscriber']['id'])); }